@@ -376,6 +376,7 @@ namespace ts {
376376 OctalLiteral = 0x00010000 , // Octal numeric literal
377377 Namespace = 0x00020000 , // Namespace declaration
378378 ExportContext = 0x00040000 , // Export context (initialized by binding)
379+ ContainsThis = 0x00080000 , // Interface contains references to "this"
379380
380381 Modifier = Export | Ambient | Public | Private | Protected | Static | Abstract | Default | Async ,
381382 AccessibilityModifier = Public | Private | Protected ,
@@ -1496,6 +1497,7 @@ namespace ts {
14961497 // declaration emitter to help determine if it should patch up the final declaration file
14971498 // with import statements it previously saw (but chose not to emit).
14981499 trackSymbol ( symbol : Symbol , enclosingDeclaration ?: Node , meaning ?: SymbolFlags ) : void ;
1500+ reportInaccessibleThisError ( ) : void ;
14991501 }
15001502
15011503 export const enum TypeFormatFlags {
@@ -1797,6 +1799,7 @@ namespace ts {
17971799 /* @internal */
17981800 ContainsAnyFunctionType = 0x00800000 , // Type is or contains object literal type
17991801 ESSymbol = 0x01000000 , // Type of symbol primitive introduced in ES6
1802+ ThisType = 0x02000000 , // This type
18001803
18011804 /* @internal */
18021805 Intrinsic = Any | String | Number | Boolean | ESSymbol | Void | Undefined | Null ,
@@ -1842,6 +1845,7 @@ namespace ts {
18421845 typeParameters : TypeParameter [ ] ; // Type parameters (undefined if non-generic)
18431846 outerTypeParameters : TypeParameter [ ] ; // Outer type parameters (undefined if none)
18441847 localTypeParameters : TypeParameter [ ] ; // Local type parameters (undefined if none)
1848+ thisType : TypeParameter ; // The "this" type (undefined if none)
18451849 /* @internal */
18461850 resolvedBaseConstructorType ?: Type ; // Resolved base constructor type of class
18471851 /* @internal */
@@ -1856,10 +1860,17 @@ namespace ts {
18561860 declaredNumberIndexType : Type ; // Declared numeric index type
18571861 }
18581862
1859- // Type references (TypeFlags.Reference)
1863+ // Type references (TypeFlags.Reference). When a class or interface has type parameters or
1864+ // a "this" type, references to the class or interface are made using type references. The
1865+ // typeArguments property specififes the types to substitute for the type parameters of the
1866+ // class or interface and optionally includes an extra element that specifies the type to
1867+ // substitute for "this" in the resulting instantiation. When no extra argument is present,
1868+ // the type reference itself is substituted for "this". The typeArguments property is undefined
1869+ // if the class or interface has no type parameters and the reference isn't specifying an
1870+ // explicit "this" argument.
18601871 export interface TypeReference extends ObjectType {
18611872 target : GenericType ; // Type reference target
1862- typeArguments : Type [ ] ; // Type reference type arguments
1873+ typeArguments : Type [ ] ; // Type reference type arguments (undefined if none)
18631874 }
18641875
18651876 // Generic class and interface types
0 commit comments