mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 02:35:48 -05:00
Handle undefined location.parent when getting completionEntryDetails (#54138)
This commit is contained in:
committed by
GitHub
parent
910efac23e
commit
42d69cfa77
@@ -452,7 +452,7 @@ export function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker: Typ
|
||||
displayParts.push(spacePart());
|
||||
displayParts.push(operatorPart(SyntaxKind.EqualsToken));
|
||||
displayParts.push(spacePart());
|
||||
addRange(displayParts, typeToDisplayParts(typeChecker, isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, TypeFormatFlags.InTypeAlias));
|
||||
addRange(displayParts, typeToDisplayParts(typeChecker, location.parent && isConstTypeReference(location.parent) ? typeChecker.getTypeAtLocation(location.parent) : typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration, TypeFormatFlags.InTypeAlias));
|
||||
}
|
||||
if (symbolFlags & SymbolFlags.Enum) {
|
||||
prefixNextMeaning();
|
||||
|
||||
Reference in New Issue
Block a user