UNPKG

mitt-vue

Version:

Lightweight utility for integrating mitt with Vue 2 and Vue 3

8 lines (7 loc) 318 B
import { EventCallback } from './types'; /** * Registers event listeners for Vue 3 using lifecycle hooks. * @param event - The event name to listen for. * @param callback - The callback to invoke when the event is emitted. */ export declare function useEventListener(event: string, callback: EventCallback): void;