@variantjs/vue
Version:
Vue VariantJS: Fully configurable Vue 3 components styled with TailwindCSS
13 lines (12 loc) • 546 B
TypeScript
declare type EmitterFunction = (...args: any[]) => void;
declare type EmitterEvents = {
[key: string]: EmitterFunction[];
};
interface EmitterInterface {
on(name: keyof EmitterEvents, callback: EmitterFunction): void;
once(name: keyof EmitterEvents, callback: EmitterFunction): void;
emit(name: keyof EmitterEvents, ...args: any[]): void;
emit(name: keyof EmitterEvents, ...args: any[]): void;
off(name: keyof EmitterEvents, callback: EmitterFunction): void;
}
export { EmitterEvents, EmitterFunction, EmitterInterface };