mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 12:18:54 +00:00
fix(types): stricter type condition for EventHandlers
(#12840)
fix #12832
This commit is contained in:
parent
a5afc4d0a4
commit
0b3cf7dda9
4
types/jsx.d.ts
vendored
4
types/jsx.d.ts
vendored
@ -1297,7 +1297,9 @@ 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
|
||||
}
|
||||
|
||||
type ReservedProps = {
|
||||
|
Loading…
Reference in New Issue
Block a user