@@ -3887,10 +3887,9 @@ namespace ts {
3887
3887
3888
3888
function getAlternativeContainingModules(symbol: Symbol, enclosingDeclaration: Node): Symbol[] {
3889
3889
const containingFile = getSourceFileOfNode(enclosingDeclaration);
3890
- const id = getNodeId(containingFile);
3891
3890
const links = getSymbolLinks(symbol);
3892
3891
let results: Symbol[] | undefined;
3893
- if (links.extendedContainersByFile && (results = links.extendedContainersByFile.get(id ))) {
3892
+ if (links.extendedContainersByFile && (results = links.extendedContainersByFile.get(containingFile ))) {
3894
3893
return results;
3895
3894
}
3896
3895
if (containingFile && containingFile.imports) {
@@ -3904,7 +3903,7 @@ namespace ts {
3904
3903
results = append(results, resolvedModule);
3905
3904
}
3906
3905
if (length(results)) {
3907
- (links.extendedContainersByFile || (links.extendedContainersByFile = new Map())) .set(id , results!);
3906
+ (links.extendedContainersByFile ||= new Map()).set(containingFile , results!);
3908
3907
return results!;
3909
3908
}
3910
3909
}
@@ -33796,7 +33795,7 @@ namespace ts {
33796
33795
const type = checkExpression(node);
33797
33796
// If control flow analysis was required to determine the type, it is worth caching.
33798
33797
if (flowInvocationCount !== startInvocationCount) {
33799
- const cache = flowTypeCache || (flowTypeCache = []);
33798
+ const cache = ( flowTypeCache ||= []);
33800
33799
cache[getNodeId(node)] = type;
33801
33800
setNodeFlags(node, node.flags | NodeFlags.TypeCached);
33802
33801
}
@@ -40318,9 +40317,8 @@ namespace ts {
40318
40317
const enclosingFile = getSourceFileOfNode(node);
40319
40318
const links = getNodeLinks(enclosingFile);
40320
40319
if (!(links.flags & NodeCheckFlags.TypeChecked)) {
40321
- links.deferredNodes = links.deferredNodes || new Map();
40322
- const id = getNodeId(node);
40323
- links.deferredNodes.set(id, node);
40320
+ links.deferredNodes ||= new Set();
40321
+ links.deferredNodes.add(node);
40324
40322
}
40325
40323
}
40326
40324
0 commit comments