declare class SignalBinding { _listener: (...params: T[]) => void; private _isOnce; private _signal; context: any; _priority: any; active: boolean; params: any[] | null; constructor(signal: Signal, listener: (...params: T[]) => void, isOnce?: boolean, listenerContext?: any, priority?: number); /** * Call listener passing arbitrary parameters. *

If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

* @param {Array} [paramsArr] Array of parameters that should be passed to the listener * @return {*} Value returned by the listener. */ execute(paramsArr: any[]): any; /** * Detach binding from signal. * - alias to: mySignal.remove(myBinding.getListener()); * @return {Function|null} Handler function bound to the signal or `null` if binding was previously detached. */ detach(): any; /** * @return {Boolean} `true` if binding is still bound to the signal and have a listener. */ isBound(): boolean; /** * @return {boolean} If SignalBinding will only be executed once. */ isOnce(): any; /** * @return {Function} Handler function bound to the signal. */ getListener(): (...params: T[]) => void; /** * @return {Signal} Signal that listener is currently bound to. */ getSignal(): any; /** * Delete instance properties * @private */ _destroy(): void; /** * @return {string} String representation of the object. */ toString(): string; } export declare class Signal { private _bindings?; private _prevParams?; private _shouldPropagate; VERSION: string; memorize: boolean; active: boolean; constructor(); static dispatch(): void; /** * @param {Function} listener * @param {boolean} isOnce * @param {Object} [listenerContext] * @param {Number} [priority] * @return {SignalBinding} * @private */ private _registerListener; /** * @param {SignalBinding} binding * @private */ _addBinding(binding: SignalBinding): void; /** * @param {Function} listener * @return {number} * @private */ _indexOfListener(listener: (...params: T[]) => void, context?: any): number; /** * Check if listener was attached to Signal. * @param {Function} listener * @param {Object} [context] * @return {boolean} if Signal has the specified listener. */ has(listener: (...params: T[]) => void, context?: any): boolean; /** * Add a listener to the signal. * @param {Function} listener Signal handler function. * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) * @return {SignalBinding} An Object representing the binding between the Signal and listener. */ add(listener: (...params: T[]) => void, listenerContext?: any, priority?: number): any; /** * Add listener to the signal that should be removed after first execution (will be executed only once). * @param {Function} listener Signal handler function. * @param {Object} [listenerContext] Context on which listener will be executed (object that should represent the `this` variable inside listener function). * @param {Number} [priority] The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added. (default = 0) * @return {SignalBinding} An Object representing the binding between the Signal and listener. */ addOnce(listener: (...params: T[]) => void, listenerContext?: any, priority?: number): any; /** * Remove a single listener from the dispatch queue. * @param {Function} listener Handler function that should be removed. * @param {Object} [context] Execution context (since you can add the same handler multiple times if executing in a different context). * @return {Function} Listener handler function. */ remove(listener: (...params: T[]) => void, context?: any): (...params: T[]) => void; /** * Remove all listeners from the Signal. */ removeAll(): void; /** * @return {number} Number of listeners attached to the Signal. */ getNumListeners(): number; /** * Stop propagation of the event, blocking the dispatch to next listeners on the queue. *

IMPORTANT: should be called only during signal dispatch, calling it before/after dispatch won't affect signal broadcast.

* @see Signal.prototype.disable */ halt(): void; /** * Dispatch/Broadcast Signal to all listeners added to the queue. * @param {...*} [params] Parameters that should be passed to each handler. */ dispatch(...params: T[]): void; /** * Forget memorized arguments. * @see Signal.memorize */ forget(): void; /** * Remove all bindings from signal and destroy any reference to external objects (destroy Signal object). *

IMPORTANT: calling any method on the signal instance after calling dispose will throw errors.

*/ dispose(): void; /** * @return {string} String representation of the object. */ toString(): string; } export {};