Added Q.race method.

This method was missing from the type definitions file.
This commit is contained in:
Remo H. Jansen
2015-11-25 09:40:03 +00:00
parent b2d17b5dad
commit 53e93bf70a

5
q/Q.d.ts vendored
View File

@@ -206,6 +206,11 @@ declare module Q {
* Returns a promise that is fulfilled with an array containing the fulfillment value of each promise, or is rejected with the same rejection reason as the first promise to be rejected.
*/
export function all<T>(promises: IPromise<T>[]): Promise<T[]>;
/**
* Returns a promise for the first of an array of promises to become settled.
*/
export function race<T>(promises: IPromise<T>[]): Promise<T>;
/**
* Returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, i.e. become either fulfilled or rejected.