Skip to content

Commit

Permalink
fix(types): stricter type condition for EventHandlers (vuejs#6855)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk authored and zhangzhonghe committed Apr 12, 2023
1 parent 2db1708 commit 2b190ed
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 2b190ed

Please sign in to comment.