From e1fd5e5225110715be82db617028fa3bbfbc958f Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 6 Apr 2019 06:29:59 -1000 Subject: [PATCH] Fix unsafe parameter coercions related to PragmaPseudoMap --- src/compiler/parser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 2757c15c524..4c68de60c85 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -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; @@ -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": {