interface EqEventCallback { id: string; callback: (event: EqEvent) => void; } interface EqEventTypeRec { type: string; eventCallbacks: Array; } /** * Represents EasyQuery event */ export interface EqEvent { /** * The type of the event */ type: string; /** * The source of the event */ source: any; /** * The additional data of the event */ data?: any; } /** * The representation of event emitter. */ export declare class EventEmitter { /** * The array of events. */ protected events: EqEventTypeRec[]; /** * The source. */ protected source: any; private silentMode; /** * The default constructor. * @param source The source. */ constructor(source: any); /** * Subscries to the event. * @param eventType The event type. * @param callback The callback. * @returns The subscribtion ID. */ subscribe(eventType: string, callback: (event: EqEvent) => void): string; /** * Unsubsribes from the event. * @param eventType The event type. * @param callbackId The subscribtion ID. */ unsubscribe(eventType: string, callbackId: string): void; /** * Fires the event. * @param eventType The event type. * @param data The event data. * @param postpone The postpone. * @param force To fire force. If value is `true`, ignores silent mode. */ fire(eventType: string, data?: any, postpone?: number, force?: boolean): void; /** * Enters to silent mode. */ enterSilentMode(): void; /** * Exits from silent mode. */ exitSilentMode(): void; /** * Checks if emitter is in silent mode. * @return `true`, if silent mode is enable. */ isSilent(): boolean; private getEventRecByType; } export {};