//// [declFileForTypeParameters.ts] class C { 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 { x: T; foo(a: T): T; }