From: Johnson Chu Date: Tue, 8 Nov 2022 15:37:37 +0000 (+0800) Subject: fix(types): stricter type condition for `EventHandlers` (#6855) X-Git-Tag: v3.2.42~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bad3f3ce46aad1f5fec47d1d02aee26af393bcff;p=thirdparty%2Fvuejs%2Fcore.git fix(types): stricter type condition for `EventHandlers` (#6855) fix #6899 --- diff --git a/packages/runtime-dom/types/jsx.d.ts b/packages/runtime-dom/types/jsx.d.ts index 6120f77715..5898b5e0d5 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