TypeScript/tests/cases/fourslash/instanceTypesForGenericType1.ts

14 lines
422 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
/// <reference path='fourslash.ts'/>
////class G<T> { // Introduce type parameter T
//// self: G<T>; // Use T as type argument to form instance type
//// f() {
2014-10-07 20:30:27 +02:00
//// this./*1*/self = /*2*/this; // self and this are both of type G<T>
2014-07-13 01:04:16 +02:00
//// }
////}
goTo.marker('1');
2014-10-07 20:30:27 +02:00
verify.quickInfoIs('(property) G<T>.self: G<T>');
2014-07-13 01:04:16 +02:00
goTo.marker('2');
2014-10-07 20:30:27 +02:00
verify.quickInfoIs('class G<T>');