From ad62037f25cf09092a08aef21b2791f751f63a35 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Tue, 15 Aug 2017 11:42:25 -0700 Subject: [PATCH] Use checkExpression to resolve symbols --- src/compiler/checker.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 1c41be84ba7..cfa76c0315a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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((funcSymbol.valueDeclaration).initializer); }