Create typed version of reject

That is necessary for smooth migration to TypeScript target ES6.
This commit is contained in:
Andrey Kurdyumov
2016-02-22 01:05:17 +06:00
parent 95433230a9
commit e1699c4108
+1
View File
@@ -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.