mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Added Q.race method.
This method was missing from the type definitions file.
This commit is contained in:
5
q/Q.d.ts
vendored
5
q/Q.d.ts
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user