-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Make a single set of decorators that work in TypeScript with experimentalDecorators set to either true or false, and in Babel with version equal to "2023-05" by duck-typing the decorator arguments.
After this effort we will have one set of decorators that work under the following cases:
- TypeScript with
experimentalDecorators: trueand no accessor keyword - TypeScript with
experimentalDecorators: trueand accessor keywords - TypeScript with
experimentalDecorators: falseand accessor keywords - Babel with
experimentalDecorators: falseand accessor keywords
The trade-off is that we have to have the same behavior in each configuration:
- We can't skip reflection for initial property values
- We have to wrap accessors as we can't detect the difference between auto-accessors and hand-written accessors with experimental decorators
Tasks:
- Make legacy-decorators work with
experimentalDecorators: falseand pass the std-decorators tests ([reactive-element] 3.0 hybrid decorators #4140) - Unify the behavior
- Reflect initial property values to attributes ([reactive-element] Make standard property decorator reflect initial values #4145)
- Always wrap accessors ([reactive-element] Always wrap user accessors #4146)
- Remove std-decorator and legacy-decorator files, but not std-decorator tests.
- Run decorators against std-decorator tests with
experimentalDecorators: true. - Re-enable Babel tests when [Bug]: Decorator metadata is not implemented babel/babel#15889 is fixed.
- Add a compiler-time flag to choose one or both decorator implementations to enable code elimination
- Ensure we have tests for
noAccessor: truein all cases - Deprecate and add a dev-mode warning for overrides of
createPropertyandgetPropertyDescriptor
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done