You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
navigate to http://127.0.0.1:3333 -> property is beeing reflected, change detection triggers
un-comment useDefineForClassFields in tsconfig.json
yarn rollup -c
navigate to http://127.0.0.1:3333 -> property is NOT being reflected, change detection does not trigger
Expected Results
change detection and reflection works with new [[Define]] TS semantic
Actual Results
TS [[Define]] breaks property augmentation by decorators. Babel works (they pass the propertyDescriptor of the class field into the decorator, TS just overwrites the property defined by the decorator)
Browsers Affected
Chrome
Firefox
Edge
Safari 11
Safari 10
IE 11
Versions
lit-element: v2.2.1
The text was updated successfully, but these errors were encountered:
Description
new "useDefineForClassFields" feature in typesccript (which will be default in 3.8.0) breaks class field decorators
This is mainly a bug for visibility/reach, here is the corresponding bug entry in the typescript project:
microsoft/TypeScript#35081
Live Demo
Repository to reproduce:
https://github.com/mzeiher/litelement-decorator-ts-define-break
Steps to Reproduce
yarn install
yarn rollup -c
npx http-static
http://127.0.0.1:3333
-> property is beeing reflected, change detection triggersuseDefineForClassFields
intsconfig.json
yarn rollup -c
http://127.0.0.1:3333
-> property is NOT being reflected, change detection does not triggerExpected Results
change detection and reflection works with new [[Define]] TS semantic
Actual Results
TS [[Define]] breaks property augmentation by decorators. Babel works (they pass the propertyDescriptor of the class field into the decorator, TS just overwrites the property defined by the decorator)
Browsers Affected
Versions
The text was updated successfully, but these errors were encountered: