import { EventHandler, EventName } from "./types"; /** * Event emitter class that allows subscribing to and emitting events. * * @class */ export declare class EventEmitter { /** * The internal emitter instance. */ private emitter; /** * Creates an instance of EventEmitter. * * @constructor */ constructor(); /** * Subscribes to an event. * * @param {EventName} eventName - The name of the event to subscribe to. * @param {EventHandler} cb - The event handler callback function. * @returns {void} */ on(eventName: EventName, cb: EventHandler): void; /** * Emits an event. * * @param {EventName} eventName - The name of the event to emit. * @param {unknown} [payload] - Optional payload to pass to the event handlers. * @returns {void} */ emit: (eventName: EventName, payload?: unknown) => void; /** * Cleans up all the listeners. * * @returns {void} */ cleanListeners(): void; } //# sourceMappingURL=EventEmitter.d.ts.map