mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
update signature of Promise.all and Promise.race
This commit is contained in:
4
es6-promise/es6-promise.d.ts
vendored
4
es6-promise/es6-promise.d.ts
vendored
@@ -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' {
|
||||
|
||||
Reference in New Issue
Block a user