Skip to content

Commit bad3f3c

Browse files
authoredNov 8, 2022
fix(types): stricter type condition for EventHandlers (#6855)
fix #6899
1 parent dd3354c commit bad3f3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/runtime-dom/types/jsx.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ export interface Events {
13011301
}
13021302

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

13071307
// use namespace import to avoid collision with generated types which use

0 commit comments

Comments
 (0)
Please sign in to comment.