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
The ev.target would allow accessing all the public methods available on the host element.
Additionally it would be valuable to export the custom event type as an interface for each event, so that development eco-systems like Angular can access the reusable type:
When the event is emitted, it already contains information around the target, but does not include any type information in the generated types. This is problematic because developers have to re-cast or use any for event handlers.
Ideally, developers would like to directly access the correct typings the event target, without having to recast:
Prerequisites
Describe the Feature Request
Export additional type data on the generated component interfaces, that allows developers to have typings for the event target with custom events.
i.e.:
Usage:
The
ev.target
would allow accessing all the public methods available on the host element.Additionally it would be valuable to export the custom event type as an interface for each event, so that development eco-systems like Angular can access the reusable type:
Describe the Use Case
When the event is emitted, it already contains information around the
target
, but does not include any type information in the generated types. This is problematic because developers have to re-cast or useany
for event handlers.Ideally, developers would like to directly access the correct typings the event target, without having to recast:
Describe Preferred Solution
There are two changes that are necessary to support this (from the generated output).
HTMLElement
, such as:Describe Alternatives
No response
Related Code
I have the first case outlined above handled with this:
I will investigate the work effort of the second item.
Additional Information
Related issues:
Framework:
Stencil output targets:
The text was updated successfully, but these errors were encountered: