Port other missing TypeFlags changes

This commit is contained in:
Jake Bailey
2025-06-24 15:08:41 -07:00
parent e4e9fe741f
commit e1df139180
3 changed files with 10 additions and 9 deletions
+5 -4
View File
@@ -6285,11 +6285,11 @@ export const enum TypeFlags {
ESSymbol = 1 << 9, // Type of symbol primitive introduced in ES6
StringLiteral = 1 << 10,
NumberLiteral = 1 << 11,
BooleanLiteral = 1 << 12,
BigIntLiteral = 1 << 13,
BigIntLiteral = 1 << 12,
BooleanLiteral = 1 << 13,
UniqueESSymbol = 1 << 14, // unique symbol
EnumLiteral = 1 << 15, // Always combined with StringLiteral, NumberLiteral, or Union
Enum = 1 << 16, // Numeric computed enum member value
Enum = 1 << 16, // Numeric computed enum member value (must be right after EnumLiteral, see getSortOrderFlags)
NonPrimitive = 1 << 17, // intrinsic object type
Never = 1 << 18, // Never type
TypeParameter = 1 << 19, // Type parameter
@@ -6306,7 +6306,8 @@ export const enum TypeFlags {
Reserved1 = 1 << 29, // Used by union/intersection type construction
/** @internal */
Reserved2 = 1 << 30, // Used by union/intersection type construction
/** @internal */
Reserved3 = 1 << 31,
/** @internal */
AnyOrUnknown = Any | Unknown,
/** @internal */
+4 -4
View File
@@ -6580,8 +6580,8 @@ declare namespace ts {
ESSymbol = 512,
StringLiteral = 1024,
NumberLiteral = 2048,
BooleanLiteral = 4096,
BigIntLiteral = 8192,
BigIntLiteral = 4096,
BooleanLiteral = 8192,
UniqueESSymbol = 16384,
EnumLiteral = 32768,
Enum = 65536,
@@ -6604,8 +6604,8 @@ declare namespace ts {
PossiblyFalsy = 15868,
StringLike = 12583968,
NumberLike = 67648,
BigIntLike = 8320,
BooleanLike = 4352,
BigIntLike = 4224,
BooleanLike = 8448,
EnumLike = 98304,
ESSymbolLike = 16896,
VoidLike = 20,
@@ -48,7 +48,7 @@ function fx2<T>(x: T | undefined) {
> : ^^^^^^^^^^^^^
x; // T & Falsy | undefined
>x : (T & null) | (T & "") | (T & 0) | (T & false) | (T & 0n) | undefined
>x : (T & null) | (T & "") | (T & 0) | (T & 0n) | (T & false) | undefined
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
}