25 lines
392 B
JavaScript
25 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;
|
|
}
|