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
2018-02-07 15:39:04 -08:00
parent b118c0c6c8
commit 5b1f29c722
37 changed files with 60 additions and 52 deletions

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;