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); }