@@ -219,6 +219,7 @@ namespace ts {
219219 ThisType ,
220220 TypeOperator ,
221221 IndexedAccessType ,
222+ MappedType ,
222223 LiteralType ,
223224 // Binding patterns
224225 ObjectBindingPattern ,
@@ -520,6 +521,7 @@ namespace ts {
520521 export type EqualsGreaterThanToken = Token < SyntaxKind . EqualsGreaterThanToken > ;
521522 export type EndOfFileToken = Token < SyntaxKind . EndOfFileToken > ;
522523 export type AtToken = Token < SyntaxKind . AtToken > ;
524+ export type ReadonlyToken = Token < SyntaxKind . ReadonlyKeyword > ;
523525
524526 export type Modifier
525527 = Token < SyntaxKind . AbstractKeyword >
@@ -903,6 +905,14 @@ namespace ts {
903905 indexType : TypeNode ;
904906 }
905907
908+ export interface MappedTypeNode extends TypeNode , Declaration {
909+ kind : SyntaxKind . MappedType ;
910+ readonlyToken ?: ReadonlyToken ;
911+ typeParameter : TypeParameterDeclaration ;
912+ questionToken ?: QuestionToken ;
913+ type ?: TypeNode ;
914+ }
915+
906916 export interface LiteralTypeNode extends TypeNode {
907917 kind : SyntaxKind . LiteralType ;
908918 literal : Expression ;
@@ -2501,7 +2511,7 @@ namespace ts {
25012511 RegularEnum = 0x00000100 , // Enum
25022512 ValueModule = 0x00000200 , // Instantiated module
25032513 NamespaceModule = 0x00000400 , // Uninstantiated module
2504- TypeLiteral = 0x00000800 , // Type Literal
2514+ TypeLiteral = 0x00000800 , // Type Literal or mapped type
25052515 ObjectLiteral = 0x00001000 , // Object Literal
25062516 Method = 0x00002000 , // Method
25072517 Constructor = 0x00004000 , // Constructor
@@ -2780,10 +2790,11 @@ namespace ts {
27802790 Reference = 1 << 2 , // Generic type reference
27812791 Tuple = 1 << 3 , // Synthesized generic tuple type
27822792 Anonymous = 1 << 4 , // Anonymous
2783- Instantiated = 1 << 5 , // Instantiated anonymous type
2784- ObjectLiteral = 1 << 6 , // Originates in an object literal
2785- EvolvingArray = 1 << 7 , // Evolving array type
2786- ObjectLiteralPatternWithComputedProperties = 1 << 8 , // Object literal pattern with computed properties
2793+ Mapped = 1 << 5 , // Mapped
2794+ Instantiated = 1 << 6 , // Instantiated anonymous or mapped type
2795+ ObjectLiteral = 1 << 7 , // Originates in an object literal
2796+ EvolvingArray = 1 << 8 , // Evolving array type
2797+ ObjectLiteralPatternWithComputedProperties = 1 << 9 , // Object literal pattern with computed properties
27872798 ClassOrInterface = Class | Interface
27882799 }
27892800
@@ -2852,6 +2863,15 @@ namespace ts {
28522863 mapper ?: TypeMapper ; // Instantiation mapper
28532864 }
28542865
2866+ /* @internal */
2867+ export interface MappedType extends ObjectType {
2868+ declaration : MappedTypeNode ;
2869+ typeParameter ?: TypeParameter ;
2870+ constraintType ?: Type ;
2871+ templateType ?: Type ;
2872+ mapper ?: TypeMapper ; // Instantiation mapper
2873+ }
2874+
28552875 export interface EvolvingArrayType extends ObjectType {
28562876 elementType : Type ; // Element expressions of evolving array type
28572877 finalArrayType ?: Type ; // Final array type of evolving array type
0 commit comments