diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 00d6502ae9b..188245fa7cc 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -97,7 +97,7 @@ namespace ts { type ForEachChildFunction = (node: any, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray) => T | undefined) => T | undefined; - const forEachChildTable = Array(SyntaxKind.Count); + const forEachChildTable = new Array(SyntaxKind.Count); forEachChildTable[SyntaxKind.QualifiedName] = forEachQualifiedName;