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]
|
|
|
|
var __extends = this.__extends || function (d, b) {
|
|
|
|
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
|
|
function __() { this.constructor = d; }
|
|
|
|
__.prototype = b.prototype;
|
|
|
|
d.prototype = new __();
|
|
|
|
};
|
|
|
|
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);
|
|
|
|
}
|
2015-03-26 21:46:35 +01:00
|
|
|
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;
|
|
|
|
});
|