|
2602 | 2602 |
|
2603 | 2603 | export const enum SymbolFlags {
|
2604 | 2604 | None = 0,
|
2605 |
| - FunctionScopedVariable = 0x00000001, // Variable (var) or parameter |
2606 |
| - BlockScopedVariable = 0x00000002, // A block-scoped variable (let or const) |
2607 |
| - Property = 0x00000004, // Property or enum member |
2608 |
| - EnumMember = 0x00000008, // Enum member |
2609 |
| - Function = 0x00000010, // Function |
2610 |
| - Class = 0x00000020, // Class |
2611 |
| - Interface = 0x00000040, // Interface |
2612 |
| - ConstEnum = 0x00000080, // Const enum |
2613 |
| - RegularEnum = 0x00000100, // Enum |
2614 |
| - ValueModule = 0x00000200, // Instantiated module |
2615 |
| - NamespaceModule = 0x00000400, // Uninstantiated module |
2616 |
| - TypeLiteral = 0x00000800, // Type Literal or mapped type |
2617 |
| - ObjectLiteral = 0x00001000, // Object Literal |
2618 |
| - Method = 0x00002000, // Method |
2619 |
| - Constructor = 0x00004000, // Constructor |
2620 |
| - GetAccessor = 0x00008000, // Get accessor |
2621 |
| - SetAccessor = 0x00010000, // Set accessor |
2622 |
| - Signature = 0x00020000, // Call, construct, or index signature |
2623 |
| - TypeParameter = 0x00040000, // Type parameter |
2624 |
| - TypeAlias = 0x00080000, // Type alias |
2625 |
| - ExportValue = 0x00100000, // Exported value marker (see comment in declareModuleMember in binder) |
2626 |
| - ExportType = 0x00200000, // Exported type marker (see comment in declareModuleMember in binder) |
2627 |
| - ExportNamespace = 0x00400000, // Exported namespace marker (see comment in declareModuleMember in binder) |
2628 |
| - Alias = 0x00800000, // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker) |
2629 |
| - Instantiated = 0x01000000, // Instantiated symbol |
2630 |
| - Merged = 0x02000000, // Merged symbol (created during program binding) |
2631 |
| - Transient = 0x04000000, // Transient symbol (created during type check) |
2632 |
| - Prototype = 0x08000000, // Prototype property (no source representation) |
2633 |
| - SyntheticProperty = 0x10000000, // Property in union or intersection type |
2634 |
| - Optional = 0x20000000, // Optional property |
2635 |
| - ExportStar = 0x40000000, // Export * declaration |
| 2605 | + FunctionScopedVariable = 1 << 0, // Variable (var) or parameter |
| 2606 | + BlockScopedVariable = 1 << 1, // A block-scoped variable (let or const) |
| 2607 | + Property = 1 << 2, // Property or enum member |
| 2608 | + EnumMember = 1 << 3, // Enum member |
| 2609 | + Function = 1 << 4, // Function |
| 2610 | + Class = 1 << 5, // Class |
| 2611 | + Interface = 1 << 6, // Interface |
| 2612 | + ConstEnum = 1 << 7, // Const enum |
| 2613 | + RegularEnum = 1 << 8, // Enum |
| 2614 | + ValueModule = 1 << 9, // Instantiated module |
| 2615 | + NamespaceModule = 1 << 10, // Uninstantiated module |
| 2616 | + TypeLiteral = 1 << 11, // Type Literal or mapped type |
| 2617 | + ObjectLiteral = 1 << 12, // Object Literal |
| 2618 | + Method = 1 << 13, // Method |
| 2619 | + Constructor = 1 << 14, // Constructor |
| 2620 | + GetAccessor = 1 << 15, // Get accessor |
| 2621 | + SetAccessor = 1 << 16, // Set accessor |
| 2622 | + Signature = 1 << 17, // Call, construct, or index signature |
| 2623 | + TypeParameter = 1 << 18, // Type parameter |
| 2624 | + TypeAlias = 1 << 19, // Type alias |
| 2625 | + ExportValue = 1 << 20, // Exported value marker (see comment in declareModuleMember in binder) |
| 2626 | + ExportType = 1 << 21, // Exported type marker (see comment in declareModuleMember in binder) |
| 2627 | + ExportNamespace = 1 << 22, // Exported namespace marker (see comment in declareModuleMember in binder) |
| 2628 | + Alias = 1 << 23, // An alias for another symbol (see comment in isAliasSymbolDeclaration in checker) |
| 2629 | + Prototype = 1 << 24, // Prototype property (no source representation) |
| 2630 | + ExportStar = 1 << 25, // Export * declaration |
| 2631 | + Optional = 1 << 26, // Optional property |
| 2632 | + Transient = 1 << 27, // Transient symbol (created during type check) |
2636 | 2633 |
|
2637 | 2634 | Enum = RegularEnum | ConstEnum,
|
2638 | 2635 | Variable = FunctionScopedVariable | BlockScopedVariable,
|
|
2692 | 2689 | name: string; // Name of symbol
|
2693 | 2690 | declarations?: Declaration[]; // Declarations associated with this symbol
|
2694 | 2691 | valueDeclaration?: Declaration; // First value declaration of the symbol
|
2695 |
| - |
2696 | 2692 | members?: SymbolTable; // Class, interface or literal instance members
|
2697 | 2693 | exports?: SymbolTable; // Module exports
|
2698 | 2694 | globalExports?: SymbolTable; // Conditional global UMD exports
|
2699 |
| - /* @internal */ isReadonly?: boolean; // readonly? (set only for intersections and unions) |
2700 | 2695 | /* @internal */ id?: number; // Unique id (used to look up SymbolLinks)
|
2701 | 2696 | /* @internal */ mergeId?: number; // Merge id (used to look up merged symbol)
|
2702 | 2697 | /* @internal */ parent?: Symbol; // Parent symbol
|
|
2721 | 2716 | leftSpread?: Symbol; // Left source for synthetic spread property
|
2722 | 2717 | rightSpread?: Symbol; // Right source for synthetic spread property
|
2723 | 2718 | mappedTypeOrigin?: Symbol; // For a property on a mapped type, points back to the orignal 'T' from 'keyof T'.
|
2724 |
| - hasNonUniformType?: boolean; // True if constituents have non-uniform types |
2725 |
| - isPartial?: boolean; // True if syntheric property of union type occurs in some but not all constituents |
2726 | 2719 | isDiscriminantProperty?: boolean; // True if discriminant synthetic property
|
2727 | 2720 | resolvedExports?: SymbolTable; // Resolved exports of module
|
2728 | 2721 | exportsChecked?: boolean; // True if exports of external module have been checked
|
|
2732 | 2725 | }
|
2733 | 2726 |
|
2734 | 2727 | /* @internal */
|
2735 |
| - export interface TransientSymbol extends Symbol, SymbolLinks { } |
| 2728 | + export const enum CheckFlags { |
| 2729 | + Instantiated = 1 << 0, // Instantiated symbol |
| 2730 | + SyntheticProperty = 1 << 1, // Property in union or intersection type |
| 2731 | + Readonly = 1 << 2, // Readonly transient symbol |
| 2732 | + Partial = 1 << 3, // Synthetic property present in some but not all constituents |
| 2733 | + HasNonUniformType = 1 << 4, // Synthetic property with non-uniform type in constituents |
| 2734 | + ContainsPublic = 1 << 5, // Synthetic property with public constituent(s) |
| 2735 | + ContainsProtected = 1 << 6, // Synthetic property with protected constituent(s) |
| 2736 | + ContainsPrivate = 1 << 7, // Synthetic property with private constituent(s) |
| 2737 | + ContainsStatic = 1 << 8, // Synthetic property with static constituent(s) |
| 2738 | + } |
| 2739 | + |
| 2740 | + /* @internal */ |
| 2741 | + export interface TransientSymbol extends Symbol, SymbolLinks { |
| 2742 | + checkFlags: CheckFlags; |
| 2743 | + } |
2736 | 2744 |
|
2737 | 2745 | export type SymbolTable = Map<Symbol>;
|
2738 | 2746 |
|
|
0 commit comments