Buslowicz / twc

TypeScript based, boilerplate-less, Polymer toolbox friendly Polymer Modules
32 stars 1 forks source link

Decorators are not properly processed when tsconfig.json is present #43

Closed tpluscode closed 7 years ago

tpluscode commented 7 years ago

When I merely added a tsconfig.json with empty compilerOptions section to my project, the output is not the same as when the config file is absent.

Instead of only the Polymer() call, the output JS also contains the __decorate function and it's being used as typescript does by default. For example with @notify instead of notify: true, I'm getting

__decorate([
  notify
], AgsForm.prototype, "value");        
Buslowicz commented 7 years ago

Fixed this issue and #44, #45, #46 in #49 PR. Fixed by setting additional experimentalDecorators and module as fixed options in compiler and handling tsconfig without compilerOptions field.