export declare const EVENT_NAMES: { readonly load: "load"; }; declare type EventKeys = (typeof EVENT_NAMES)[keyof typeof EVENT_NAMES]; declare type EventMap = { [K in EventKeys]: (error?: any) => void; }; declare type EventName = keyof EventMap; declare type Listener = EventMap[T]; declare class StoreEventEmitter { #private; constructor(); /** * Register an event listener * @param eventName - The name of the event to listen to * @param listener - The callback function to invoke when the event is emitted * @returns This emitter instance for chaining */ on(eventName: T, listener: Listener): this; /** * Register a one-time event listener * @param eventName - The name of the event to listen to * @param listener - The callback function to invoke when the event is emitted * @returns This emitter instance for chaining */ once(eventName: T, listener: Listener): this; /** * Remove an event listener * @param eventName - The name of the event to remove the listener from * @param listener - The callback function to remove * @returns This emitter instance for chaining */ off(eventName: T, listener: Listener): this; /** * Emit an event with optional arguments * @param eventName - The name of the event to emit * @param args - Arguments to pass to the listeners * @returns true if the event had listeners, false otherwise */ emit(eventName: T, ...args: Parameters): boolean; /** * Remove all listeners for a specific event or all events * @param eventName - The name of the event to remove all listeners from (optional) * @returns This emitter instance for chaining */ removeAllListeners(eventName?: EventName): this; /** * Get the number of listeners for a specific event * @param eventName - The name of the event * @returns The number of listeners */ listenerCount(eventName: EventName): number; /** * Get all event names that have listeners * @returns An array of event names */ eventNames(): string[]; /** * Get the maximum number of listeners for this emitter * @returns The maximum number of listeners */ getMaxListeners(): number; /** * Set the maximum number of listeners for this emitter * @param n - The maximum number of listeners * @returns This emitter instance for chaining */ setMaxListeners(n: number): this; /** * Check if there are any listeners for a specific event * @param eventName - The name of the event to check * @returns true if there are listeners, false otherwise */ hasListeners(eventName: EventName): boolean; } declare const storeEventEmitter: StoreEventEmitter; export { storeEventEmitter };