Closed
Description
Design-type metadata such as design:type
, design:paramtypes
and design:returntype
are great to build modern JavaScript frameworks. It would be very useful to also have a design:generics
metadata to keep track of generic types, e.g.
class Foo {}
class Bar {}
class Baz {
map: Map<Foo, Bar>;
}
would transpile to
// ... Foo and Bar functions
var Baz = (function () {
function Baz() {
}
__decorate([
__metadata('design:type', Map),
__metadata('design:generics', [ Foo, Bar ]),
], Baz.prototype, "map", void 0);
return Baz;
}());
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mhegazy commentedon Oct 26, 2016
The issue of type serialization/"reflection" has been discussed multiple times (#2902, #2577, #3060). we already have #3628 to track this discussion; so i suggest moving this proposal to that issue.