diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4ce54bbcab..305852103d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -40317,8 +40317,8 @@ namespace ts { const enclosingFile = getSourceFileOfNode(node); const links = getNodeLinks(enclosingFile); if (!(links.flags & NodeCheckFlags.TypeChecked)) { - links.deferredNodes ||= new Set(); - links.deferredNodes.add(node); + links.deferredNodes ||= []; + links.deferredNodes[getNodeId(node)] = node; } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 951c3b8a01..6660f9849a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5106,7 +5106,7 @@ namespace ts { jsxNamespace?: Symbol | false; // Resolved jsx namespace symbol for this node jsxImplicitImportContainer?: Symbol | false; // Resolved module symbol the implicit jsx import of this file should refer to contextFreeType?: Type; // Cached context-free type used by the first pass of inference; used when a function's return is partially contextually sensitive - deferredNodes?: Set; // Set of nodes whose checking has been deferred + deferredNodes?: Node[]; // Sparse array of nodes whose checking has been deferred capturedBlockScopeBindings?: Symbol[]; // Block-scoped bindings captured beneath this part of an IterationStatement outerTypeParameters?: TypeParameter[]; // Outer type parameters of anonymous object type isExhaustive?: boolean; // Is node an exhaustive switch statement