0.2.0 • Published 9 years ago

babel-plugin-angular2-type-annotation v0.2.0

Weekly downloads
2
License
ISC
Repository
github
Last release
9 years ago

build status npm version npm downloads

babel-plugin-angular2-type-annotation

An experimental babel transformer plugin for Angular 2 type annotation.

Example

Before:

class HelloComponent {
  constructor(@Parent() foo: Foo, bar: Bar) {
  }
}

After:

class HelloComponent {
  constructor(foo: Foo, bar: Bar) {
  }
}
Object.defineProperty(HelloComponent, 'parameters', { get: function () {
  return [[Foo, new Parent()], [Bar]];
}});

See babel-angular2-app for more complete example.