Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
4.22.2
Stencil Framework Output Target
React
Stencil Framework Output Target Version
0.7.4
Current Behavior
Prior to upgrading to 0.7.x, in version 0.5.3, event types name were driven (I believe) from the LocalJSX (exported as JSX) of the generated components.d.ts file, which included a nomenclature of [InterfaceName]CustomEvent.
declare namespace LocalJSX { interface MyFoo { "onMyEventTrigger"?: (event: MyFooCustomEvent<number>) -> void; } }
Now with version 0.7.x, the event type name changed to EventName<CustomEvent<number>>
within the generated component.ts.
While I understand that the event is not a complex type but I don't think it should have changed from what it was before. This breaks any consumer of my library that I published. What I don't understand is that the LocalJSX still has the same event type, MyFooCustomEvent<number>
as it was in the 0.5.3 version.
Expected Behavior
I would have expected the event types to be same as it was before
Steps to Reproduce
- Created a stencil web component with an event (non complex type) using stencil version 4.20.0
- Generate the react wrapper using react-output-target version 0.5.3
- Create a react application that uses the web component react wrapper and handles the event using typescript
- Upgrade the stencil library to 4.22.2 and upgrade the react-output-target to 0.7.4
- Upgrade the react application to use the updated web component react wrapper
Code Reproduction URL
Additional Information
No response