mirror of https://github.com/vuejs/core.git
fix(types): stricter type condition for `EventHandlers` (#6855)
fix #6899
This commit is contained in:
parent
dd3354c4c7
commit
bad3f3ce46
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue