@@ -241,6 +241,7 @@ namespace ts {
241241 TypeKeyword ,
242242 UndefinedKeyword ,
243243 UniqueKeyword ,
244+ UnknownKeyword ,
244245 FromKeyword ,
245246 GlobalKeyword ,
246247 OfKeyword , // LastKeyword and LastToken and LastContextualKeyword
@@ -1068,6 +1069,7 @@ namespace ts {
10681069
10691070 export interface KeywordTypeNode extends TypeNode {
10701071 kind : SyntaxKind . AnyKeyword
1072+ | SyntaxKind . UnknownKeyword
10711073 | SyntaxKind . NumberKeyword
10721074 | SyntaxKind . ObjectKeyword
10731075 | SyntaxKind . BooleanKeyword
@@ -3665,40 +3667,43 @@ namespace ts {
36653667
36663668 export const enum TypeFlags {
36673669 Any = 1 << 0 ,
3668- String = 1 << 1 ,
3669- Number = 1 << 2 ,
3670- Boolean = 1 << 3 ,
3671- Enum = 1 << 4 ,
3672- StringLiteral = 1 << 5 ,
3673- NumberLiteral = 1 << 6 ,
3674- BooleanLiteral = 1 << 7 ,
3675- EnumLiteral = 1 << 8 , // Always combined with StringLiteral, NumberLiteral, or Union
3676- ESSymbol = 1 << 9 , // Type of symbol primitive introduced in ES6
3677- UniqueESSymbol = 1 << 10 , // unique symbol
3678- Void = 1 << 11 ,
3679- Undefined = 1 << 12 ,
3680- Null = 1 << 13 ,
3681- Never = 1 << 14 , // Never type
3682- TypeParameter = 1 << 15 , // Type parameter
3683- Object = 1 << 16 , // Object type
3684- Union = 1 << 17 , // Union (T | U)
3685- Intersection = 1 << 18 , // Intersection (T & U)
3686- Index = 1 << 19 , // keyof T
3687- IndexedAccess = 1 << 20 , // T[K]
3688- Conditional = 1 << 21 , // T extends U ? X : Y
3689- Substitution = 1 << 22 , // Type parameter substitution
3690- NonPrimitive = 1 << 23 , // intrinsic object type
3670+ Unknown = 1 << 1 ,
3671+ String = 1 << 2 ,
3672+ Number = 1 << 3 ,
3673+ Boolean = 1 << 4 ,
3674+ Enum = 1 << 5 ,
3675+ StringLiteral = 1 << 6 ,
3676+ NumberLiteral = 1 << 7 ,
3677+ BooleanLiteral = 1 << 8 ,
3678+ EnumLiteral = 1 << 9 , // Always combined with StringLiteral, NumberLiteral, or Union
3679+ ESSymbol = 1 << 10 , // Type of symbol primitive introduced in ES6
3680+ UniqueESSymbol = 1 << 11 , // unique symbol
3681+ Void = 1 << 12 ,
3682+ Undefined = 1 << 13 ,
3683+ Null = 1 << 14 ,
3684+ Never = 1 << 15 , // Never type
3685+ TypeParameter = 1 << 16 , // Type parameter
3686+ Object = 1 << 17 , // Object type
3687+ Union = 1 << 18 , // Union (T | U)
3688+ Intersection = 1 << 19 , // Intersection (T & U)
3689+ Index = 1 << 20 , // keyof T
3690+ IndexedAccess = 1 << 21 , // T[K]
3691+ Conditional = 1 << 22 , // T extends U ? X : Y
3692+ Substitution = 1 << 23 , // Type parameter substitution
3693+ NonPrimitive = 1 << 24 , // intrinsic object type
36913694 /* @internal */
3692- FreshLiteral = 1 << 24 , // Fresh literal or unique type
3695+ FreshLiteral = 1 << 25 , // Fresh literal or unique type
36933696 /* @internal */
3694- UnionOfUnitTypes = 1 << 25 , // Type is union of unit types
3697+ UnionOfUnitTypes = 1 << 26 , // Type is union of unit types
36953698 /* @internal */
3696- ContainsWideningType = 1 << 26 , // Type is or contains undefined or null widening type
3699+ ContainsWideningType = 1 << 27 , // Type is or contains undefined or null widening type
36973700 /* @internal */
3698- ContainsObjectLiteral = 1 << 27 , // Type is or contains object literal type
3701+ ContainsObjectLiteral = 1 << 28 , // Type is or contains object literal type
36993702 /* @internal */
3700- ContainsAnyFunctionType = 1 << 28 , // Type is or contains the anyFunctionType
3703+ ContainsAnyFunctionType = 1 << 29 , // Type is or contains the anyFunctionType
37013704
3705+ /* @internal */
3706+ AnyOrUnknown = Any | Unknown ,
37023707 /* @internal */
37033708 Nullable = Undefined | Null ,
37043709 Literal = StringLiteral | NumberLiteral | BooleanLiteral ,
@@ -3710,7 +3715,7 @@ namespace ts {
37103715 DefinitelyFalsy = StringLiteral | NumberLiteral | BooleanLiteral | Void | Undefined | Null ,
37113716 PossiblyFalsy = DefinitelyFalsy | String | Number | Boolean ,
37123717 /* @internal */
3713- Intrinsic = Any | String | Number | Boolean | BooleanLiteral | ESSymbol | Void | Undefined | Null | Never | NonPrimitive ,
3718+ Intrinsic = Any | Unknown | String | Number | Boolean | BooleanLiteral | ESSymbol | Void | Undefined | Null | Never | NonPrimitive ,
37143719 /* @internal */
37153720 Primitive = String | Number | Boolean | Enum | EnumLiteral | ESSymbol | Void | Undefined | Null | Literal | UniqueESSymbol ,
37163721 StringLike = String | StringLiteral ,
@@ -3731,8 +3736,8 @@ namespace ts {
37313736
37323737 // 'Narrowable' types are types where narrowing actually narrows.
37333738 // This *should* be every type other than null, undefined, void, and never
3734- Narrowable = Any | StructuredOrInstantiable | StringLike | NumberLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive ,
3735- NotUnionOrUnit = Any | ESSymbol | Object | NonPrimitive ,
3739+ Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | NumberLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive ,
3740+ NotUnionOrUnit = Any | Unknown | ESSymbol | Object | NonPrimitive ,
37363741 /* @internal */
37373742 NotUnit = Any | String | Number | Boolean | Enum | ESSymbol | Void | Never | StructuredOrInstantiable ,
37383743 /* @internal */
0 commit comments