Skip to content

Commit

Permalink
fix(types): stricter type condition for EventHandlers (#6855)
Browse files Browse the repository at this point in the history
fix #6899
  • Loading branch information
johnsoncodehk committed Nov 8, 2022
1 parent dd3354c commit bad3f3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime-dom/types/jsx.d.ts
Expand Up @@ -1301,7 +1301,7 @@ export interface Events {
}

type EventHandlers<E> = {
[K in keyof E]?: E[K] extends Function ? E[K] : (payload: E[K]) => void
[K in keyof E]?: E[K] extends (...args: any) => any ? E[K] : (payload: E[K]) => void
}

// use namespace import to avoid collision with generated types which use
Expand Down

0 comments on commit bad3f3c

Please sign in to comment.