New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit serialized design-time type metadata for decorators #2577

Closed
rbuckton opened this Issue Apr 1, 2015 · 0 comments

Comments

Projects
None yet
2 participants
@rbuckton
Member

rbuckton commented Apr 1, 2015

Add support behind an experimental compiler option to emit design-type metadata for decorated declarations in source.

  • Add __metadata helper that depends on a polyfill for a proposed Reflect.metadata decorator.
  • Emit calls to __metadata for class and member (property and method) decorators
  • For a class declaration, emit the type metadata for constructor parameters of the constructor with a body.
  • For a method declaration, emit the type metadata for the member, its parameters, and its return type.
  • For an accessor or property declaration, emit the type metadata for the member.
  • Add compiler option to enable experimental metadata support.

A few notes on metadata:

  • Type metadata uses the metadata key "design:type".
  • Parameter type metadata uses the metadata key "design:paramtypes".
  • Return type metadata uses the metadata key "design:returntype".
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.