stenciljs/eslint-plugin
Auf GitHub ansehenfeat: Compiler should support union types for the @Element decorator
Open
#89 geöffnet am 19. März 2023
Help Wanted
Repository-Metriken
- Stars
- (71 Stars)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Right now, the ESlint Compiler throws an exception when I define a union type for my element:
@Element() element: HTMLMyComponentElement | undefined;
To satisfy my "strict": true Typescript config I have to define it like so. Pretending element! exists is not the right solution since it will be undefined until it's rendered.
Describe the Use Case
It's required when using Typescript strict mode.
Describe Preferred Solution
No response
Describe Alternatives
No response
Related Code
No response
Additional Information
No response