Skip to content

Commit e1fd5e5

Browse files
committed
Fix unsafe parameter coercions related to PragmaPseudoMap
1 parent 9832a83 commit e1fd5e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/compiler/parser.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7784,7 +7784,7 @@ namespace ts {
77847784
const referencedFiles = context.referencedFiles;
77857785
const typeReferenceDirectives = context.typeReferenceDirectives;
77867786
const libReferenceDirectives = context.libReferenceDirectives;
7787-
forEach(toArray(entryOrList), (arg: PragmaPseudoMap["reference"]) => {
7787+
forEach(toArray(entryOrList) as PragmaPseudoMap["reference"][], arg => {
77887788
const { types, lib, path } = arg.arguments;
77897789
if (arg.arguments["no-default-lib"]) {
77907790
context.hasNoDefaultLib = true;
@@ -7806,8 +7806,8 @@ namespace ts {
78067806
}
78077807
case "amd-dependency": {
78087808
context.amdDependencies = map(
7809-
toArray(entryOrList),
7810-
(x: PragmaPseudoMap["amd-dependency"]) => ({ name: x.arguments.name, path: x.arguments.path }));
7809+
toArray(entryOrList) as PragmaPseudoMap["amd-dependency"][],
7810+
x => ({ name: x.arguments.name, path: x.arguments.path }));
78117811
break;
78127812
}
78137813
case "amd-module": {

0 commit comments

Comments
 (0)