import {Emitter, EventHandlerMap, Handler, WildcardHandler} from "mitt"; import {emitEvent} from "./EventBus"; declare module "@idevelopthings/vue-tailwind-ui" { export interface EventsMap { 'EventBusInitialized': void; } declare class EventBus implements Emitter { get all(): EventHandlerMap; public emit(type: Key, event: EventsMap[Key]): void; public emit(type: undefined extends EventsMap[Key] ? Key : never): void; public emit(type, event?): void; public off(type: Key, handler?: Handler): void; public off(type: "*", handler: WildcardHandler): void; public off(type, handler?): void; public on(type: Key, handler: Handler): void; public on(type: "*", handler: WildcardHandler): void; public on(type, handler): void; } export function useEvent(type: Key, handler: Handler): void; export function useEvent(type: "*", handler: WildcardHandler): void; export function useEvent(type, handler): void ; export function emitEvent(type: Key, data: EventsMap[Key]): void; export function emitEvent(type, data): void ; } declare module "@vue/runtime-core" { import {EventBus} from "./EventBus"; interface ComponentCustomProperties { $events: EventBus; $emitEvent: typeof emitEvent; } } export {};