export declare class EventAction { readonly data: any; constructor(data: any); } export declare class Events { private static _events; private _localEvents; /** * Triggers a global event on the application * * @static * @template T * @param {string} name The name of the event * @param {T} [data] The data to send to the event * @memberof Events */ static trigger(name: string, data?: T): Promise; /** * Adds a global event to the application * * @static * @param {string} name The name of the event * @param {(event: EventAction) => void} action The action that should be executed * @returns * @memberof Events */ static on(name: string, action: (event: EventAction) => void): typeof Events; /** * Removes a global event from the application * * @static * @param {string} name The name of the event * @param {(event: EventAction) => void} [action] An option action. If no action is passed all events with this name are removed * @returns * @memberof Events */ static off(name: string, action?: (event: EventAction) => void): typeof Events; /** * Removes all global events from the application * * @static * @returns * @memberof Events */ static clear(): typeof Events; /** * Triggers a local event * * @template T * @param {string} name The name of the local event * @param {T} [data] Optional data to send to the local event * @memberof Events */ trigger(name: string, data?: T): Promise; /** * Adds a local event to the instance * * @param {string} name The name of the event * @param {(event: EventAction) => void} action The action that should be executed * @returns * @memberof Events */ on(name: string, action: (event: EventAction) => void): this; /** * Removes a local event from the instance * * @param {string} name The name of the event * @param {(event: EventAction) => void} [action] An option action. If no action is passed all events with this name are removed * @returns * @memberof Events */ off(name: string, action?: (event: EventAction) => void): this; /** * Removes all local events from the instance * * @returns * @memberof Events */ clear(): this; }