@@ -43076,7 +43076,7 @@ namespace ts {
43076
43076
}
43077
43077
const node = getParseTreeNode(nodeIn, isIdentifier);
43078
43078
if (node) {
43079
- const symbol = getReferencedSymbol (node, /*startInDeclarationContainer*/ undefined );
43079
+ const symbol = getReferencedValueOrAliasSymbol (node);
43080
43080
43081
43081
// We should only get the declaration of an alias if there isn't a local value
43082
43082
// declaration for the symbol
@@ -43488,24 +43488,14 @@ namespace ts {
43488
43488
* This is because when caching the resolved symbol, we only consider value symbols, but here
43489
43489
* we want to also get an alias symbol if one exists.
43490
43490
*/
43491
- function getReferencedSymbol (reference: Identifier, startInDeclarationContainer?: boolean ): Symbol | undefined {
43491
+ function getReferencedValueOrAliasSymbol (reference: Identifier): Symbol | undefined {
43492
43492
const resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
43493
43493
if (resolvedSymbol && resolvedSymbol !== unknownSymbol) {
43494
43494
return resolvedSymbol;
43495
43495
}
43496
43496
43497
- let location: Node = reference;
43498
- if (startInDeclarationContainer) {
43499
- // When resolving the name of a declaration as a value, we need to start resolution
43500
- // at a point outside of the declaration.
43501
- const parent = reference.parent;
43502
- if (isDeclaration(parent) && reference === parent.name) {
43503
- location = getDeclarationContainer(parent);
43504
- }
43505
- }
43506
-
43507
43497
return resolveName(
43508
- location ,
43498
+ reference ,
43509
43499
reference.escapedText,
43510
43500
SymbolFlags.Value | SymbolFlags.ExportValue | SymbolFlags.Alias,
43511
43501
/*nodeNotFoundMessage*/ undefined,
0 commit comments