@@ -43070,10 +43070,10 @@ namespace ts {
43070
43070
}
43071
43071
const node = getParseTreeNode(nodeIn, isIdentifier);
43072
43072
if (node) {
43073
- const symbol = getReferencedValueSymbol(node);
43073
+ const symbol = getReferencedValueSymbol(node); // >> Change it here
43074
43074
// We should only get the declaration of an alias if there isn't a local value
43075
43075
// declaration for the symbol
43076
- if (isNonLocalAlias(symbol, /*excludes*/ SymbolFlags.Value) && !getTypeOnlyAliasDeclaration(symbol)) {
43076
+ if (isNonLocalAlias(symbol, /*excludes*/ SymbolFlags.Value) && !getTypeOnlyAliasDeclaration(symbol)) { // >> Probably use the default excludes now
43077
43077
return getDeclarationOfAliasSymbol(symbol);
43078
43078
}
43079
43079
}
@@ -43456,10 +43456,10 @@ namespace ts {
43456
43456
}
43457
43457
43458
43458
function getReferencedValueSymbol(reference: Identifier, startInDeclarationContainer?: boolean): Symbol | undefined {
43459
- const resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
43460
- if (resolvedSymbol) {
43461
- return resolvedSymbol;
43462
- }
43459
+ // const resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
43460
+ // if (resolvedSymbol) {
43461
+ // return resolvedSymbol;
43462
+ // }
43463
43463
43464
43464
let location: Node = reference;
43465
43465
if (startInDeclarationContainer) {
@@ -43474,6 +43474,38 @@ namespace ts {
43474
43474
return resolveName(location, reference.escapedText, SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Alias, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true);
43475
43475
}
43476
43476
43477
+ // function getReferencedAnySymbolOld(reference: Identifier, startInDeclarationContainer?: boolean): Symbol | undefined {
43478
+ // // >> Can't use cached resolved symbol because it might be `unknown` symbol
43479
+ // // const resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
43480
+ // // if (resolvedSymbol) {
43481
+ // // return resolvedSymbol;
43482
+ // // }
43483
+
43484
+ // let location: Node = reference;
43485
+ // if (startInDeclarationContainer) {
43486
+ // // When resolving the name of a declaration as a value, we need to start resolution
43487
+ // // at a point outside of the declaration.
43488
+ // const parent = reference.parent;
43489
+ // if (isDeclaration(parent) && reference === parent.name) {
43490
+ // location = getDeclarationContainer(parent);
43491
+ // }
43492
+ // }
43493
+
43494
+ // // return resolveName(location, reference.escapedText, SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Alias, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true);
43495
+ // return resolveNameHelper(
43496
+ // location,
43497
+ // reference.escapedText,
43498
+ // SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Alias,
43499
+ // /*nameNotFoundMessage*/ undefined,
43500
+ // /*nameArg*/ undefined,
43501
+ // /*isUse*/ true,
43502
+ // /*excludeGlobals*/ false,
43503
+ // /*getSpellingSuggestions*/ true,
43504
+ // (symbol, name, _meaning) => getSymbol(symbol, name, SymbolFlags.All),
43505
+ // // /*reportErrors*/ false,
43506
+ // );
43507
+ // }
43508
+
43477
43509
function getReferencedValueDeclaration(referenceIn: Identifier): Declaration | undefined {
43478
43510
if (!isGeneratedIdentifier(referenceIn)) {
43479
43511
const reference = getParseTreeNode(referenceIn, isIdentifier);
0 commit comments