Version
2.7.13
Reproduction link
www.typescriptlang.org/play
Steps to reproduce
open the reproduction link
What is expected?
<div @click="handleClick">ok</div>
to work
What is actually happening?
Type '() => void' is not assignable to type 'MouseEvent'
DOM's Event was tainted by @types/node
.
E[K]
extends Function always true
type EventHandlers<E> = { [K in keyof E]?: E[K] extends Function ? E[K] : (payload: E[K]) => void }