@@ -2635,25 +2635,18 @@ namespace ts {
26352635 Null = 1 << 12 ,
26362636 Never = 1 << 13 , // Never type
26372637 TypeParameter = 1 << 14 , // Type parameter
2638- Class = 1 << 15 , // Class
2639- Interface = 1 << 16 , // Interface
2640- Reference = 1 << 17 , // Generic type reference
2641- Tuple = 1 << 18 , // Synthesized generic tuple type
2642- Union = 1 << 19 , // Union (T | U)
2643- Intersection = 1 << 20 , // Intersection (T & U)
2644- Anonymous = 1 << 21 , // Anonymous
2645- Instantiated = 1 << 22 , // Instantiated anonymous type
2638+ Object = 1 << 15 , // Object type
2639+ Union = 1 << 16 , // Union (T | U)
2640+ Intersection = 1 << 17 , // Intersection (T & U)
26462641 /* @internal */
2647- ObjectLiteral = 1 << 23 , // Originates in an object literal
2642+ FreshLiteral = 1 << 18 , // Fresh literal type
26482643 /* @internal */
2649- FreshLiteral = 1 << 24 , // Fresh literal type
2644+ ContainsWideningType = 1 << 19 , // Type is or contains undefined or null widening type
26502645 /* @internal */
2651- ContainsWideningType = 1 << 25 , // Type is or contains undefined or null widening type
2646+ ContainsObjectLiteral = 1 << 20 , // Type is or contains object literal type
26522647 /* @internal */
2653- ContainsObjectLiteral = 1 << 26 , // Type is or contains object literal type
2654- /* @internal */
2655- ContainsAnyFunctionType = 1 << 27 , // Type is or contains object literal type
2656- Spread = 1 << 28 , // Spread types
2648+ ContainsAnyFunctionType = 1 << 21 , // Type is or contains object literal type
2649+ Spread = 1 << 22 , // Spread types
26572650
26582651 /* @internal */
26592652 Nullable = Undefined | Null ,
@@ -2670,15 +2663,14 @@ namespace ts {
26702663 NumberLike = Number | NumberLiteral | Enum | EnumLiteral ,
26712664 BooleanLike = Boolean | BooleanLiteral ,
26722665 EnumLike = Enum | EnumLiteral ,
2673- ObjectType = Class | Interface | Reference | Tuple | Anonymous ,
26742666 UnionOrIntersection = Union | Intersection ,
2675- StructuredType = ObjectType | Union | Intersection | Spread ,
2667+ StructuredType = Object | Union | Intersection | Spread ,
26762668 StructuredOrTypeParameter = StructuredType | TypeParameter ,
26772669
26782670 // 'Narrowable' types are types where narrowing actually narrows.
26792671 // This *should* be every type other than null, undefined, void, and never
26802672 Narrowable = Any | StructuredType | TypeParameter | StringLike | NumberLike | BooleanLike | ESSymbol | Spread ,
2681- NotUnionOrUnit = Any | ESSymbol | ObjectType ,
2673+ NotUnionOrUnit = Any | ESSymbol | Object ,
26822674 /* @internal */
26832675 RequiresWidening = ContainsWideningType | ContainsObjectLiteral ,
26842676 /* @internal */
@@ -2721,9 +2713,22 @@ namespace ts {
27212713 baseType : EnumType & UnionType ; // Base enum type
27222714 }
27232715
2716+ export const enum ObjectFlags {
2717+ Class = 1 << 0 , // Class
2718+ Interface = 1 << 1 , // Interface
2719+ Reference = 1 << 2 , // Generic type reference
2720+ Tuple = 1 << 3 , // Synthesized generic tuple type
2721+ Anonymous = 1 << 4 , // Anonymous
2722+ Instantiated = 1 << 5 , // Instantiated anonymous type
2723+ ObjectLiteral = 1 << 6 , // Originates in an object literal
2724+ EvolvingArray = 1 << 7 , // Evolving array type
2725+ ObjectLiteralPatternWithComputedProperties = 1 << 8 , // Object literal pattern with computed properties
2726+ ClassOrInterface = Class | Interface
2727+ }
2728+
27242729 // Object types (TypeFlags.ObjectType)
27252730 export interface ObjectType extends Type {
2726- isObjectLiteralPatternWithComputedProperties ?: boolean ;
2731+ objectFlags : ObjectFlags ;
27272732 }
27282733
27292734 // Class and interface types (TypeFlags.Class and TypeFlags.Interface)
@@ -2777,6 +2782,8 @@ namespace ts {
27772782
27782783 export interface IntersectionType extends UnionOrIntersectionType { }
27792784
2785+ export type StructuredType = ObjectType | UnionType | IntersectionType ;
2786+
27802787 /* @internal */
27812788 export interface SpreadType extends Type {
27822789 left : SpreadType | ResolvedType ;
@@ -2788,8 +2795,11 @@ namespace ts {
27882795 export interface AnonymousType extends ObjectType {
27892796 target ?: AnonymousType ; // Instantiation target
27902797 mapper ?: TypeMapper ; // Instantiation mapper
2791- elementType ?: Type ; // Element expressions of evolving array type
2792- finalArrayType ?: Type ; // Final array type of evolving array type
2798+ }
2799+
2800+ export interface EvolvingArrayType extends ObjectType {
2801+ elementType : Type ; // Element expressions of evolving array type
2802+ finalArrayType ?: Type ; // Final array type of evolving array type
27932803 }
27942804
27952805 /* @internal */
0 commit comments