TypeScript/tests/baselines/reference/declFileForTypeParameters.js
2014-07-15 13:08:10 -07:00

26 lines
392 B
JavaScript

//// [declFileForTypeParameters.ts]
class C<T> {
x: T;
foo(a: T): T {
return this.x;
}
}
//// [declFileForTypeParameters.js]
var C = (function () {
function C() {
}
C.prototype.foo = function (a) {
return this.x;
};
return C;
})();
//// [declFileForTypeParameters.d.ts]
declare class C<T> {
x: T;
foo(a: T): T;
}