TypeScript/tests/baselines/reference/genericWithIndexerOfTypeParameterType2.js

54 lines
1.5 KiB
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [genericWithIndexerOfTypeParameterType2.ts]
export class Collection<TItem extends CollectionItem> {
_itemsByKey: { [key: string]: TItem; };
}
export class List extends Collection<ListItem>{
Bar() {}
}
export class CollectionItem {}
export class ListItem extends CollectionItem {
__isNew: boolean;
}
//// [genericWithIndexerOfTypeParameterType2.js]
2015-05-01 19:49:54 +02:00
var __extends = (this && this.__extends) || function (d, b) {
2014-07-13 01:04:16 +02:00
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
2015-06-16 21:18:31 +02:00
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2014-07-13 01:04:16 +02:00
};
define(["require", "exports"], function (require, exports) {
var Collection = (function () {
function Collection() {
}
return Collection;
})();
exports.Collection = Collection;
var List = (function (_super) {
__extends(List, _super);
function List() {
_super.apply(this, arguments);
}
List.prototype.Bar = function () { };
2014-07-13 01:04:16 +02:00
return List;
})(Collection);
exports.List = List;
var CollectionItem = (function () {
function CollectionItem() {
}
return CollectionItem;
})();
exports.CollectionItem = CollectionItem;
var ListItem = (function (_super) {
__extends(ListItem, _super);
function ListItem() {
_super.apply(this, arguments);
}
return ListItem;
})(CollectionItem);
exports.ListItem = ListItem;
});