fix d.ts; add return and parameter types

This commit is contained in:
David Yu
2015-01-24 00:10:20 -08:00
parent 7dcc4fd448
commit 83e26f8825

View File

@@ -13,8 +13,8 @@ interface SignalBinding {
active: boolean;
context: any;
params: any;
detach();
execute(paramsArr?);
detach(): Function;
execute(paramsArr?:any[]): any;
getListener(): Function;
getSignal(): Signal;
isBound(): boolean;
@@ -29,7 +29,7 @@ interface Signal {
* @author Miller Medeiros
* @constructor
*/
new();
new(): Signal;
/**
* If Signal is active and should broadcast events.
@@ -63,24 +63,24 @@ interface Signal {
* @param listenercontext Context on which listener will be executed (object that should represent the `this` variable inside listener function).
* @param 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)
*/
addOnce(listener: Function, listenerContext?, priority?): SignalBinding;
addOnce(listener: Function, listenerContext?: any, priority?: Number): SignalBinding;
/**
* Dispatch/Broadcast Signal to all listeners added to the queue.
*
* @param params Parameters that should be passed to each handler.
*/
dispatch(...params: any[]);
dispatch(...params: any[]): void;
/**
* Remove all bindings from signal and destroy any reference to external objects (destroy Signal object).
*/
dispose();
dispose(): void;
/**
* Forget memorized arguments.
*/
forget();
forget(): void;
/**
* Returns a number of listeners attached to the Signal.
@@ -90,7 +90,7 @@ interface Signal {
/**
* Stop propagation of the event, blocking the dispatch to next listeners on the queue.
*/
halt();
halt(): void;
/**
* Check if listener was attached to Signal.
@@ -102,5 +102,5 @@ interface Signal {
*/
remove(listener: Function, context?: any): Function;
removeAll();
removeAll(): void;
}