Buslowicz / twc

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

Cannot mix @notify and @computed #40

Closed tpluscode closed 7 years ago

tpluscode commented 7 years ago

When I define a property like

export class MyElement {

  @notify
  @computed
  getSomething(dependency: string) {}
}

TWC fails with

E:\Piskorz\AppData\Roaming\npm\node_modules\twc\src\annotations\index.js:44
    prop.notify = true;
                ^

TypeError: Cannot set property 'notify' of undefined
    at Object.notify (npm\node_modules\twc\src\annotations\index.js:44:17)
    at npm\node_modules\twc\src\PolymerModule.js:77:41
    at Array.forEach (native)
    at npm\node_modules\twc\src\PolymerModule.js:75:32
    at Map.forEach (native)
    at buildMethodsMap (npm\node_modules\twc\src\PolymerModule.js:72:13)
    at Module.buildPolymerV1 (npm\node_modules\twc\src\PolymerModule.js:104:26)
    at Module.toString (npm\node_modules\twc\src\PolymerModule.js:159:24)
    at Module.toBuffer (npm\node_modules\twc\src\PolymerModule.js:208:32)
    at DestroyableTransform._transform (npm\node_modules\twc\src\index.js:54:22)
Buslowicz commented 7 years ago

Fixed by #41.