TypeScript/tests/baselines/reference/instantiatedBaseTypeConstraints.js

22 lines
359 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [instantiatedBaseTypeConstraints.ts]
interface Foo<T extends Foo<T, C>, C> {
foo(bar: C): void;
}
class Bar implements Foo<Bar, string> {
foo(bar: string): void {
}
}
//// [instantiatedBaseTypeConstraints.js]
var Bar = (function () {
function Bar() {
}
Bar.prototype.foo = function (bar) {
};
return Bar;
})();