update signature of Promise.all and Promise.race

This commit is contained in:
Chris Colbert
2015-02-25 11:51:47 -05:00
parent 0acdbea7fd
commit 7f9ae75f8c

View File

@@ -54,12 +54,12 @@ declare module Promise {
* the array passed to all can be a mixture of promise-like objects and other objects.
* The fulfillment value is an array (in order) of fulfillment values. The rejection value is the first rejection value.
*/
function all<R>(promises: Promise<R>[]): Promise<R[]>;
function all<R>(promises: (R | Thenable<R>)[]): Promise<R[]>;
/**
* Make a Promise that fulfills when any item fulfills, and rejects if any item rejects.
*/
function race<R>(promises: Promise<R>[]): Promise<R>;
function race<R>(promises: (R | Thenable<R>)[]): Promise<R>;
}
declare module 'es6-promise' {