Adding another check for undefined
This commit is contained in:
parent
187eaaee7f
commit
fbda0bdd94
1 changed files with 5 additions and 1 deletions
|
@ -7165,7 +7165,11 @@ namespace ts {
|
|||
if (!leftmostIdentifier) {
|
||||
return type;
|
||||
}
|
||||
const declaration = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(leftmostIdentifier)).valueDeclaration;
|
||||
const leftmostSymbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(leftmostIdentifier));
|
||||
if (!leftmostSymbol) {
|
||||
return type;
|
||||
}
|
||||
const declaration = leftmostSymbol.valueDeclaration;
|
||||
if (!declaration || declaration.kind !== SyntaxKind.VariableDeclaration && declaration.kind !== SyntaxKind.Parameter && declaration.kind !== SyntaxKind.BindingElement) {
|
||||
return type;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue