mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Try pushing undefined to create a packed Array.
This commit is contained in:
parent
f8e1c2afaa
commit
85a0937352
@ -97,7 +97,8 @@ namespace ts {
|
||||
|
||||
type ForEachChildFunction = <T>(node: any, cbNode: (node: Node) => T | undefined, cbNodes?: (nodes: NodeArray<Node>) => T | undefined) => T | undefined;
|
||||
|
||||
const forEachChildTable = new Array<ForEachChildFunction>(SyntaxKind.Count);
|
||||
const forEachChildTable: Array<ForEachChildFunction | undefined> = [];
|
||||
for (let i = 0; i < SyntaxKind.Count; i++) forEachChildTable.push(undefined);
|
||||
forEachChildTable[SyntaxKind.QualifiedName] = forEachQualifiedName;
|
||||
forEachChildTable[SyntaxKind.TypeParameter] = forEachTypeParameter;
|
||||
forEachChildTable[SyntaxKind.ShorthandPropertyAssignment] = forEachShorthandPropertyAssignment;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user