/** * EventBus - A simple pub/sub event system to replace React Context * Allows components to subscribe to and publish events */ export type EventCallback = (data: T) => void; export declare class EventBus { private events; /** * Subscribe to an event * @param eventName - The name of the event to subscribe to * @param callback - The callback function to be called when the event is published * @returns A function to unsubscribe from the event */ subscribe(eventName: string, callback: EventCallback): () => void; /** * Publish an event with data * @param eventName - The name of the event to publish * @param data - The data to pass to subscribers */ publish(eventName: string, data: T): void; /** * Clear all event subscriptions */ clear(): void; /** * Get the number of subscribers for an event * @param eventName - The name of the event * @returns The number of subscribers */ subscriberCount(eventName: string): number; } export declare const globalEventBus: EventBus; //# sourceMappingURL=EventBus.d.ts.map