/** * A basic, dependency-free event emitter implementation for internal library use. */ type EventHandler = (payload?: any) => void; export declare class SimpleEventEmitter { private listeners; /** * Subscribes a handler function to an event. * @param event - The name of the event to subscribe to. * @param handler - The function to call when the event is emitted. */ on(event: string, handler: EventHandler): void; /** * Unsubscribes a specific handler function from an event. * @param event - The name of the event to unsubscribe from. * @param handler - The handler function to remove. */ off(event: string, handler: EventHandler): void; /** * Emits an event, calling all subscribed handlers with the provided payload. * Handlers are called synchronously in the order they were added. * Includes basic error handling for individual handlers. * @param event - The name of the event to emit. * @param payload - Optional data to pass to the event handlers. */ emit(event: string, payload?: any): void; /** * Removes all event handlers for a specific event, or all handlers for all events. * @param event - Optional: The name of the event to clear listeners for. If omitted, all listeners for all events are removed. */ removeAllListeners(event?: string): void; } export {};