40 lines
696 B
JavaScript
40 lines
696 B
JavaScript
//// [prespecializedGenericMembers1.ts]
|
|
export interface IKitty {
|
|
|
|
}
|
|
|
|
export class Cat<CatType extends IKitty> {
|
|
constructor() {
|
|
|
|
}
|
|
}
|
|
|
|
export class CatBag {
|
|
constructor(cats: { barry: Cat<IKitty>; }) {
|
|
|
|
}
|
|
}
|
|
var cat = new Cat<IKitty>();
|
|
var catThing = {
|
|
barry: cat
|
|
};
|
|
var catBag = new CatBag(catThing);
|
|
|
|
//// [prespecializedGenericMembers1.js]
|
|
var Cat = (function () {
|
|
function Cat() {
|
|
}
|
|
return Cat;
|
|
})();
|
|
exports.Cat = Cat;
|
|
var CatBag = (function () {
|
|
function CatBag(cats) {
|
|
}
|
|
return CatBag;
|
|
})();
|
|
exports.CatBag = CatBag;
|
|
var cat = new Cat();
|
|
var catThing = {
|
|
barry: cat
|
|
};
|
|
var catBag = new CatBag(catThing);
|