import { SigmaDispatcher, Keyed } from "../../interfaces"; export default class Dispatcher implements SigmaDispatcher { private handlers; constructor(); /** * Will execute the handler everytime that the indicated event (or the * indicated events) will be triggered. * * @param {string} events The name of the event (or the events * separated by spaces). * @param {function(Object)} handler The handler to bind. * @return {dispatcher} Returns the instance itself. */ bind(events: Keyed | string[] | string, handler?: Function): this; /** * Removes the handler from a specified event (or specified events). * * @param {?string} events The name of the event (or the events * separated by spaces). If undefined, * then all handlers are removed. * @param {?function(object)} handler The handler to unbind. If undefined, * each handler bound to the event or the * events will be removed. * @return {dispatcher} Returns the instance itself. */ unbind(events?: string | string[], handler?: Function): this; /** * Executes each handler bound to the event * * @param {string} events The name of the event (or the events separated * by spaces). * @param {?object} data The content of the event (optional). * @return {dispatcher} Returns the instance itself. */ dispatchEvent(events: string | string[], data?: any): this; /** * Return an event object. * * @param {string} events The name of the event. * @param {?object} data The content of the event (optional). * @return {object} Returns the instance itself. */ private getEvent; /** * Augments an object with dispatching power */ static extend(target: any): void; }