TypeScript/tests/baselines/reference/genericConstraintDeclaration.js

24 lines
431 B
TypeScript
Raw Normal View History

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