TypeScript/tests/cases/conformance/types/thisType/contextualThisType.ts

15 lines
151 B
TypeScript
Raw Normal View History

2015-09-30 00:26:27 +02:00
interface X {
a: (p: this) => this;
}
interface Y extends X {
}
var x: Y = {
a(p) {
return p;
}
}
var y = x.a(x);