-
Notifications
You must be signed in to change notification settings - Fork 320
Closed
Labels
Needs DiscussionThis issues needs further discussion by the teamThis issues needs further discussion by the teamSeverity: High
Description
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 installyarn rollup -cnpx http-static- navigate to
http://127.0.0.1:3333-> property is beeing reflected, change detection triggers - un-comment
useDefineForClassFieldsintsconfig.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
Haprog
Metadata
Metadata
Assignees
Labels
Needs DiscussionThis issues needs further discussion by the teamThis issues needs further discussion by the teamSeverity: High