File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2904,7 +2904,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
29042904 function getSymbolLinks(symbol: Symbol): SymbolLinks {
29052905 if (symbol.flags & SymbolFlags.Transient) return (symbol as TransientSymbol).links;
29062906 const id = getSymbolId(symbol);
2907- if (sourceFileWithoutResolvedSignatureCaching && symbol.valueDeclaration && getSourceFileOfNode(symbol.valueDeclaration) === sourceFileWithoutResolvedSignatureCaching) {
2907+ if (sourceFileWithoutResolvedSignatureCaching && symbol.valueDeclaration && (isFunctionExpressionOrArrowFunction(symbol.valueDeclaration) || tryGetRootParameterDeclaration(symbol.valueDeclaration)) && getSourceFileOfNode(symbol.valueDeclaration) === sourceFileWithoutResolvedSignatureCaching) {
29082908 symbolLinksWithoutResolvedSignatureCaching ??= [];
29092909 return symbolLinksWithoutResolvedSignatureCaching[id] ??= new SymbolLinks();
29102910 }
@@ -2913,7 +2913,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
29132913
29142914 function getNodeLinks(node: Node): NodeLinks {
29152915 const nodeId = getNodeId(node);
2916- if (sourceFileWithoutResolvedSignatureCaching && getSourceFileOfNode(node) === sourceFileWithoutResolvedSignatureCaching) {
2916+ if (sourceFileWithoutResolvedSignatureCaching && (isCallLikeOrFunctionLikeExpression(node) || tryGetRootParameterDeclaration(node)) && getSourceFileOfNode(node) === sourceFileWithoutResolvedSignatureCaching) {
29172917 nodeLinksWithoutResolvedSignatureCaching ??= [];
29182918 return nodeLinksWithoutResolvedSignatureCaching[nodeId] ??= new (NodeLinks as any)();
29192919 }
You can’t perform that action at this time.
0 commit comments