diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 01c5642c7d4..54a28528da7 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -18950,7 +18950,7 @@ namespace ts { // Get type of the symbol if this is the valid symbol otherwise get type at location const symbol = getSymbolOfNode(declaration); const type = symbol && !(symbol.flags & (SymbolFlags.TypeLiteral | SymbolFlags.Signature)) - ? getTypeOfSymbol(symbol) + ? getWidenedLiteralType(getTypeOfSymbol(symbol)) : unknownType; getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags);