import { EventCallback, ListenerKey } from "./types"; /** * An extension for the Edge agent that gives it capability of * creating listeners for specific events and also emitting or notifying any listener available with the * new event. * * @export * @class AgentMessageEvents * @typedef {EventsManager} */ export declare class EventsManager { private events; /** * Just adds a new event listener by passing the event name and the callback function we want * to be notified at * * @public * @param {ListenerKey} eventName * @param {EventCallback} callback * @returns {number} */ addListener(eventName: T, callback: EventCallback): number; /** * Remove an existing event listener, used when the Agent is * stopping to make sure no memory leaks are produced * * @public * @param {ListenerKey} eventName * @param {EventCallback} callback */ removeListener(eventName: T, callback: EventCallback): void; /** * Emit some data to all the listeners of a specific event * * @public * @param {ListenerKey} eventName * @param {*} data */ emit(eventName: ListenerKey, data: any): void; }