From bad3f3ce46aad1f5fec47d1d02aee26af393bcff Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Tue, 8 Nov 2022 23:37:37 +0800 Subject: [PATCH] fix(types): stricter type condition for `EventHandlers` (#6855) fix #6899 --- packages/runtime-dom/types/jsx.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-dom/types/jsx.d.ts b/packages/runtime-dom/types/jsx.d.ts index 6120f77715a..5898b5e0d5f 100644 --- a/packages/runtime-dom/types/jsx.d.ts +++ b/packages/runtime-dom/types/jsx.d.ts @@ -1301,7 +1301,7 @@ export interface Events { } type EventHandlers = { - [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