Skip to content

Commit 05124b7

Browse files
Switch deferredNodes from a Map to a Set.
1 parent 9b1ba8f commit 05124b7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/compiler/checker.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -40316,9 +40316,8 @@ namespace ts {
4031640316
const enclosingFile = getSourceFileOfNode(node);
4031740317
const links = getNodeLinks(enclosingFile);
4031840318
if (!(links.flags & NodeCheckFlags.TypeChecked)) {
40319-
links.deferredNodes = links.deferredNodes || new Map();
40320-
const id = getNodeId(node);
40321-
links.deferredNodes.set(id, node);
40319+
links.deferredNodes ||= new Set();
40320+
links.deferredNodes.add(node);
4032240321
}
4032340322
}
4032440323

src/compiler/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5106,7 +5106,7 @@ namespace ts {
51065106
jsxNamespace?: Symbol | false; // Resolved jsx namespace symbol for this node
51075107
jsxImplicitImportContainer?: Symbol | false; // Resolved module symbol the implicit jsx import of this file should refer to
51085108
contextFreeType?: Type; // Cached context-free type used by the first pass of inference; used when a function's return is partially contextually sensitive
5109-
deferredNodes?: ESMap<NodeId, Node>; // Set of nodes whose checking has been deferred
5109+
deferredNodes?: Set<Node>; // Set of nodes whose checking has been deferred
51105110
capturedBlockScopeBindings?: Symbol[]; // Block-scoped bindings captured beneath this part of an IterationStatement
51115111
outerTypeParameters?: TypeParameter[]; // Outer type parameters of anonymous object type
51125112
isExhaustive?: boolean; // Is node an exhaustive switch statement

0 commit comments

Comments
 (0)