@@ -2612,24 +2612,17 @@ namespace ts {
26122612 Null = 1 << 12 ,
26132613 Never = 1 << 13 , // Never type
26142614 TypeParameter = 1 << 14 , // Type parameter
2615- Class = 1 << 15 , // Class
2616- Interface = 1 << 16 , // Interface
2617- Reference = 1 << 17 , // Generic type reference
2618- Tuple = 1 << 18 , // Synthesized generic tuple type
2619- Union = 1 << 19 , // Union (T | U)
2620- Intersection = 1 << 20 , // Intersection (T & U)
2621- Anonymous = 1 << 21 , // Anonymous
2622- Instantiated = 1 << 22 , // Instantiated anonymous type
2615+ Object = 1 << 15 , // Object type
2616+ Union = 1 << 16 , // Union (T | U)
2617+ Intersection = 1 << 17 , // Intersection (T & U)
26232618 /* @internal */
2624- ObjectLiteral = 1 << 23 , // Originates in an object literal
2619+ FreshLiteral = 1 << 18 , // Fresh literal type
26252620 /* @internal */
2626- FreshLiteral = 1 << 24 , // Fresh literal type
2621+ ContainsWideningType = 1 << 19 , // Type is or contains undefined or null widening type
26272622 /* @internal */
2628- ContainsWideningType = 1 << 25 , // Type is or contains undefined or null widening type
2623+ ContainsObjectLiteral = 1 << 20 , // Type is or contains object literal type
26292624 /* @internal */
2630- ContainsObjectLiteral = 1 << 26 , // Type is or contains object literal type
2631- /* @internal */
2632- ContainsAnyFunctionType = 1 << 27 , // Type is or contains object literal type
2625+ ContainsAnyFunctionType = 1 << 21 , // Type is or contains object literal type
26332626
26342627 /* @internal */
26352628 Nullable = Undefined | Null ,
@@ -2646,15 +2639,14 @@ namespace ts {
26462639 NumberLike = Number | NumberLiteral | Enum | EnumLiteral ,
26472640 BooleanLike = Boolean | BooleanLiteral ,
26482641 EnumLike = Enum | EnumLiteral ,
2649- ObjectType = Class | Interface | Reference | Tuple | Anonymous ,
26502642 UnionOrIntersection = Union | Intersection ,
2651- StructuredType = ObjectType | Union | Intersection ,
2643+ StructuredType = Object | Union | Intersection ,
26522644 StructuredOrTypeParameter = StructuredType | TypeParameter ,
26532645
26542646 // 'Narrowable' types are types where narrowing actually narrows.
26552647 // This *should* be every type other than null, undefined, void, and never
26562648 Narrowable = Any | StructuredType | TypeParameter | StringLike | NumberLike | BooleanLike | ESSymbol ,
2657- NotUnionOrUnit = Any | ESSymbol | ObjectType ,
2649+ NotUnionOrUnit = Any | ESSymbol | Object ,
26582650 /* @internal */
26592651 RequiresWidening = ContainsWideningType | ContainsObjectLiteral ,
26602652 /* @internal */
@@ -2697,9 +2689,22 @@ namespace ts {
26972689 baseType : EnumType & UnionType ; // Base enum type
26982690 }
26992691
2692+ export const enum ObjectFlags {
2693+ Class = 1 << 0 , // Class
2694+ Interface = 1 << 1 , // Interface
2695+ Reference = 1 << 2 , // Generic type reference
2696+ Tuple = 1 << 3 , // Synthesized generic tuple type
2697+ Anonymous = 1 << 4 , // Anonymous
2698+ Instantiated = 1 << 5 , // Instantiated anonymous type
2699+ ObjectLiteral = 1 << 6 , // Originates in an object literal
2700+ EvolvingArray = 1 << 7 , // Evolving array type
2701+ ObjectLiteralPatternWithComputedProperties = 1 << 8 , // Object literal pattern with computed properties
2702+ ClassOrInterface = Class | Interface
2703+ }
2704+
27002705 // Object types (TypeFlags.ObjectType)
27012706 export interface ObjectType extends Type {
2702- isObjectLiteralPatternWithComputedProperties ?: boolean ;
2707+ objectFlags : ObjectFlags ;
27032708 }
27042709
27052710 // Class and interface types (TypeFlags.Class and TypeFlags.Interface)
@@ -2753,13 +2758,18 @@ namespace ts {
27532758
27542759 export interface IntersectionType extends UnionOrIntersectionType { }
27552760
2761+ export type StructuredType = ObjectType | UnionType | IntersectionType ;
2762+
27562763 /* @internal */
27572764 // An instantiated anonymous type has a target and a mapper
27582765 export interface AnonymousType extends ObjectType {
27592766 target ?: AnonymousType ; // Instantiation target
27602767 mapper ?: TypeMapper ; // Instantiation mapper
2761- elementType ?: Type ; // Element expressions of evolving array type
2762- finalArrayType ?: Type ; // Final array type of evolving array type
2768+ }
2769+
2770+ export interface EvolvingArrayType extends ObjectType {
2771+ elementType : Type ; // Element expressions of evolving array type
2772+ finalArrayType ?: Type ; // Final array type of evolving array type
27632773 }
27642774
27652775 /* @internal */
0 commit comments