Use checkExpression to resolve symbols
This commit is contained in:
parent
80a7ed9a42
commit
ad62037f25
1 changed files with 1 additions and 3 deletions
|
@ -16376,9 +16376,7 @@ namespace ts {
|
|||
// in a JS file
|
||||
// Note:JS inferred classes might come from a variable declaration instead of a function declaration.
|
||||
// In this case, using getResolvedSymbol directly is required to avoid losing the members from the declaration.
|
||||
let funcSymbol = node.expression.kind === SyntaxKind.Identifier ?
|
||||
getResolvedSymbol(node.expression as Identifier) :
|
||||
checkExpression(node.expression).symbol;
|
||||
let funcSymbol = checkExpression(node.expression).symbol;
|
||||
if (funcSymbol && isDeclarationOfFunctionOrClassExpression(funcSymbol)) {
|
||||
funcSymbol = getSymbolOfNode((<VariableDeclaration>funcSymbol.valueDeclaration).initializer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue