From 83e26f88258026884fac86667818dd078758e3d3 Mon Sep 17 00:00:00 2001 From: David Yu Date: Sat, 24 Jan 2015 00:10:20 -0800 Subject: [PATCH] fix d.ts; add return and parameter types --- js-signals/js-signals.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js-signals/js-signals.d.ts b/js-signals/js-signals.d.ts index 5072d7b95..ebc8f72ae 100644 --- a/js-signals/js-signals.d.ts +++ b/js-signals/js-signals.d.ts @@ -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; }