UNPKG

@mr-samani/event-bus

Version:

A lightweight JavaScript event bus for any framework

20 lines (16 loc) 323 B
export {}; declare global { interface Window { app: { event: EventBus; }; } var app: { event: EventBus; }; } export interface EventBus { on(name: string, callback: (...args: any[]) => void): void; off(name: string): void; trigger(name: string, ...args: any[]): void; }