Fix the member completion returned on right side of the import when it does not resolve to any symbol

Fixes #20794
This commit is contained in:
Sheetal Nandi committed 2018-02-07 15:44:22 -08:00
1 parent b118c0c6c8
commit 5b1f29c722
37 files changed
+60 -52

No files matched your search

+4 -2
View File
@@ -24838,8 +24838,10 @@ namespace ts {
if (isInRightSideOfImportOrExportAssignment(<Identifier>node)) {
const symbol = getSymbolAtLocation(node);
const declaredType = symbol && getDeclaredTypeOfSymbol(symbol);
return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol);
if (symbol) {
const declaredType = getDeclaredTypeOfSymbol(symbol);
return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol);
}
}
return unknownType;