mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 11:24:49 -05:00
Fix services' type's isLiteral implementation (#50929)
* fix services' type's isLiteral * update literal completions tests * remove booleans from literals
This commit is contained in:
committed by
GitHub
parent
c1e9afd542
commit
fdcb2ffd1b
@@ -511,7 +511,7 @@ namespace ts {
|
||||
return !!(this.flags & TypeFlags.UnionOrIntersection);
|
||||
}
|
||||
isLiteral(): this is LiteralType {
|
||||
return !!(this.flags & TypeFlags.StringOrNumberLiteral);
|
||||
return !!(this.flags & (TypeFlags.StringLiteral | TypeFlags.NumberLiteral | TypeFlags.BigIntLiteral));
|
||||
}
|
||||
isStringLiteral(): this is StringLiteralType {
|
||||
return !!(this.flags & TypeFlags.StringLiteral);
|
||||
|
||||
Reference in New Issue
Block a user