@@ -168,6 +168,7 @@ namespace ts {
168168 DeclareKeyword ,
169169 GetKeyword ,
170170 IsKeyword ,
171+ KeyOfKeyword ,
171172 ModuleKeyword ,
172173 NamespaceKeyword ,
173174 NeverKeyword ,
@@ -216,6 +217,8 @@ namespace ts {
216217 IntersectionType ,
217218 ParenthesizedType ,
218219 ThisType ,
220+ TypeOperator ,
221+ IndexedAccessType ,
219222 LiteralType ,
220223 // Binding patterns
221224 ObjectBindingPattern ,
@@ -882,6 +885,18 @@ namespace ts {
882885 type : TypeNode ;
883886 }
884887
888+ export interface TypeOperatorNode extends TypeNode {
889+ kind : SyntaxKind . TypeOperator ;
890+ operator : SyntaxKind . KeyOfKeyword ;
891+ type : TypeNode ;
892+ }
893+
894+ export interface IndexedAccessTypeNode extends TypeNode {
895+ kind : SyntaxKind . IndexedAccessType ;
896+ objectType : TypeNode ;
897+ indexType : TypeNode ;
898+ }
899+
885900 export interface LiteralTypeNode extends TypeNode {
886901 kind : SyntaxKind . LiteralType ;
887902 literal : Expression ;
@@ -953,10 +968,6 @@ namespace ts {
953968 operator : PostfixUnaryOperator ;
954969 }
955970
956- export interface PostfixExpression extends UnaryExpression {
957- _postfixExpressionBrand : any ;
958- }
959-
960971 export interface LeftHandSideExpression extends IncrementExpression {
961972 _leftHandSideExpressionBrand : any ;
962973 }
@@ -2667,14 +2678,16 @@ namespace ts {
26672678 Object = 1 << 15 , // Object type
26682679 Union = 1 << 16 , // Union (T | U)
26692680 Intersection = 1 << 17 , // Intersection (T & U)
2681+ Index = 1 << 18 , // keyof T
2682+ IndexedAccess = 1 << 19 , // T[K]
26702683 /* @internal */
2671- FreshLiteral = 1 << 18 , // Fresh literal type
2684+ FreshLiteral = 1 << 20 , // Fresh literal type
26722685 /* @internal */
2673- ContainsWideningType = 1 << 19 , // Type is or contains undefined or null widening type
2686+ ContainsWideningType = 1 << 21 , // Type is or contains undefined or null widening type
26742687 /* @internal */
2675- ContainsObjectLiteral = 1 << 20 , // Type is or contains object literal type
2688+ ContainsObjectLiteral = 1 << 22 , // Type is or contains object literal type
26762689 /* @internal */
2677- ContainsAnyFunctionType = 1 << 21 , // Type is or contains object literal type
2690+ ContainsAnyFunctionType = 1 << 23 , // Type is or contains object literal type
26782691
26792692 /* @internal */
26802693 Nullable = Undefined | Null ,
@@ -2697,7 +2710,7 @@ namespace ts {
26972710
26982711 // 'Narrowable' types are types where narrowing actually narrows.
26992712 // This *should* be every type other than null, undefined, void, and never
2700- Narrowable = Any | StructuredType | TypeParameter | StringLike | NumberLike | BooleanLike | ESSymbol ,
2713+ Narrowable = Any | StructuredType | TypeParameter | Index | IndexedAccess | StringLike | NumberLike | BooleanLike | ESSymbol ,
27012714 NotUnionOrUnit = Any | ESSymbol | Object ,
27022715 /* @internal */
27032716 RequiresWidening = ContainsWideningType | ContainsObjectLiteral ,
@@ -2860,9 +2873,22 @@ namespace ts {
28602873 /* @internal */
28612874 resolvedApparentType : Type ;
28622875 /* @internal */
2876+ resolvedIndexType : IndexType ;
2877+ /* @internal */
2878+ resolvedIndexedAccessTypes : IndexedAccessType [ ] ;
2879+ /* @internal */
28632880 isThisType ?: boolean ;
28642881 }
28652882
2883+ export interface IndexType extends Type {
2884+ type : TypeParameter ;
2885+ }
2886+
2887+ export interface IndexedAccessType extends Type {
2888+ objectType : Type ;
2889+ indexType : TypeParameter ;
2890+ }
2891+
28662892 export const enum SignatureKind {
28672893 Call ,
28682894 Construct ,
0 commit comments