TypeScript/tests/baselines/reference/genericInstanceOf.js
2014-07-12 17:30:19 -07:00

26 lines
438 B
JavaScript

//// [genericInstanceOf.ts]
interface F {
(): number;
}
class C<T> {
constructor(public a: T, public b: F) {}
foo() {
if (this.a instanceof this.b) {
}
}
}
//// [genericInstanceOf.js]
var C = (function () {
function C(a, b) {
this.a = a;
this.b = b;
}
C.prototype.foo = function () {
if (this.a instanceof this.b) {
}
};
return C;
})();