shuhei / babel-plugin-angular2-annotations

A babel transformer plugin for Angular 2 annotations
80 stars 9 forks source link

Support class property without initializer #10

Closed shuhei closed 8 years ago

shuhei commented 8 years ago

Class property without initializer:

class Foo {
   prop;
}

should work as same as:

class Foo {
  prop = this.prop;
}

https://github.com/jeffmo/es-class-fields-and-static-properties

Class property without initializer is turned to be a property with writable: false with the decorator plugin and prevents @Input() foo; from working correctly. This PR fixes the issue.