We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
createEventDispatcher
1 parent c17384b commit 22aa51dCopy full SHA for 22aa51d
src/runtime/internal/lifecycle.ts
@@ -36,6 +36,8 @@ type ExtractObjectValues<Object extends Record<any, any>> = Object[keyof Object]
36
type ConstructDispatchFunction<EventMap extends Record<string, any>, EventKey extends keyof EventMap> =
37
EventMap[EventKey] extends never
38
? (type: EventKey) => void
39
+ : undefined extends EventMap[EventKey]
40
+ ? (type: EventKey, detail?: EventMap[EventKey]) => void
41
: (type: EventKey, detail: EventMap[EventKey]) => void
42
43
type CreateDispatchFunctionMap<EventMap> = {
0 commit comments