mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 05:03:32 +08:00
Merge pull request #8199 from kant2002/patch-1
Create typed version of reject
This commit is contained in:
1
es6-promise/es6-promise.d.ts
vendored
1
es6-promise/es6-promise.d.ts
vendored
@@ -51,6 +51,7 @@ declare module Promise {
|
||||
* Make a promise that rejects to obj. For consistency and debugging (eg stack traces), obj should be an instanceof Error
|
||||
*/
|
||||
function reject(error: any): Promise<any>;
|
||||
function reject<T>(error: T): Promise<T>;
|
||||
|
||||
/**
|
||||
* Make a promise that fulfills when every item in the array fulfills, and rejects if (and when) any item rejects.
|
||||
|
||||
Reference in New Issue
Block a user