Skip to content

Commit d2fdebe

Browse files
committed
Fix type-to-string handling of enum literal types
1 parent 50a37ce commit d2fdebe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3051,7 +3051,7 @@ namespace ts {
30513051
writePunctuation(writer, SyntaxKind.DotToken);
30523052
appendSymbolNameOnly(type.symbol, writer);
30533053
}
3054-
else if (getObjectFlags(type) & ObjectFlags.ClassOrInterface || type.flags & (TypeFlags.Enum | TypeFlags.TypeParameter)) {
3054+
else if (getObjectFlags(type) & ObjectFlags.ClassOrInterface || type.flags & (TypeFlags.EnumLike | TypeFlags.TypeParameter)) {
30553055
// The specified symbol flags need to be reinterpreted as type flags
30563056
buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, SymbolFlags.Type, SymbolFormatFlags.None, nextFlags);
30573057
}

0 commit comments

Comments
 (0)