mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user