category | alias |
---|---|
Reactive |
ToEmitsForEvents |
Converting Events to Emits.
import type { ToEmitsForEvents } from '@utype/vue'
type Props = {
onClick: (e: Event) => void;
onMousedown: () => void;
}
// Expect: { (eventname: "click", e: Event): void; (eventname: "mousedown"): void; } // [!code highlight]
type MyProp = ToEmitsForEvents<Props>