TypeScript/tests/cases/conformance/types/thisType/thisTypeInFunctions3.ts
Nathan Shively-Sanders e0e1a3b078 Test:this instantiation in type parameters
Make sure that `this` gets instantiated when it's used as a constraint
of a type parameter, and nowhere else in a signature.
2017-11-01 09:17:52 -07:00

10 lines
147 B
TypeScript

declare class Base {
check<TProp extends this>(prop: TProp): boolean;
}
class Test extends Base {
m() {
this.check(this);
}
}