Skip to content

Commit

Permalink
Fix unsafe parameter coercions related to PragmaPseudoMap
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed Apr 6, 2019
1 parent 9832a83 commit e1fd5e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7784,7 +7784,7 @@ namespace ts {
const referencedFiles = context.referencedFiles;
const typeReferenceDirectives = context.typeReferenceDirectives;
const libReferenceDirectives = context.libReferenceDirectives;
forEach(toArray(entryOrList), (arg: PragmaPseudoMap["reference"]) => {
forEach(toArray(entryOrList) as PragmaPseudoMap["reference"][], arg => {
const { types, lib, path } = arg.arguments;
if (arg.arguments["no-default-lib"]) {
context.hasNoDefaultLib = true;
Expand All @@ -7806,8 +7806,8 @@ namespace ts {
}
case "amd-dependency": {
context.amdDependencies = map(
toArray(entryOrList),
(x: PragmaPseudoMap["amd-dependency"]) => ({ name: x.arguments.name, path: x.arguments.path }));
toArray(entryOrList) as PragmaPseudoMap["amd-dependency"][],
x => ({ name: x.arguments.name, path: x.arguments.path }));
break;
}
case "amd-module": {
Expand Down

0 comments on commit e1fd5e5

Please sign in to comment.