From 7c0ed32587d0563179f2665bf69beac95be9e7d8 Mon Sep 17 00:00:00 2001 From: rafw87 Date: Sun, 29 Mar 2015 00:48:59 +0100 Subject: [PATCH] Update angular.d.ts $q.all() - separate overloads for array and hash version --- angularjs/angular.d.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index bc7fa9de0e..f3aadc9f7d 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -930,11 +930,19 @@ declare module angular { /** * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved. * - * Returns a single promise that will be resolved with an array/hash of values, each value corresponding to the promise at the same index/key in the promises array/hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value. + * Returns a single promise that will be resolved with an array of values, each value corresponding to the promise at the same index in the promises array. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value. * - * @param promises An array or hash of promises. + * @param promises An array of promises. */ - all(promises: IPromise[]|{ [id: string]: IPromise; }): IPromise; + all(promises: IPromise[]): IPromise; + /** + * Combines multiple promises into a single promise that is resolved when all of the input promises are resolved. + * + * Returns a single promise that will be resolved with a hash of values, each value corresponding to the promise at the same key in the promises hash. If any of the promises is resolved with a rejection, this resulting promise will be rejected with the same rejection value. + * + * @param promises A hash of promises. + */ + all(promises: { [id: string]: IPromise; }): IPromise<{ [id: string]: any; }>; /** * Creates a Deferred object which represents a task which will finish in the future. */