Closed
Description
Is your feature request related to a problem? Please describe.
Current component type check can only check if it is (e: Event) => any
Describe the solution you'd like
- Event forward like
<button on:click />
can have type check in consumer component - Can type check for event dispatched by event-dispatcher
Describe alternatives you've considered
if the event dispatched by event-dispatcher can't be type-check or it is dispatched by an imported function provides a way to manually define the event's type. For example:
interface $$ComponentEventDef {
'some-event': CustomEvent<number>
}
Metadata
Metadata
Assignees
Labels
No labels