TypeScript/tests/baselines/reference/noConstraintInReturnType1.js

20 lines
422 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [noConstraintInReturnType1.ts]
class List<T extends {}> {
static empty<T extends {}>(): List<T> { return null; }
}
//// [noConstraintInReturnType1.js]
var List = (function () {
function List() {
}
List.empty = function () { return null; };
2014-07-13 01:04:16 +02:00
return List;
})();
//// [noConstraintInReturnType1.d.ts]
declare class List<T extends {}> {
2014-07-12 01:36:06 +02:00
static empty<T extends {}>(): List<T>;
}