mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Merge pull request #3240 from Nemo157/when-catch-filter
Add in lambda filtered catches for when's promises
This commit is contained in:
Vendored
+8
@@ -56,6 +56,14 @@ declare module When {
|
||||
}
|
||||
|
||||
interface Promise<T> {
|
||||
// Make sure you test any usage of these overloads, exceptionType must
|
||||
// be a constructor with prototype set to an instance of Error.
|
||||
catch<U>(exceptionType: any, onRejected?: (reason: any) => Promise<U>): Promise<U>;
|
||||
catch<U>(exceptionType: any, onRejected?: (reason: any) => U): Promise<U>;
|
||||
|
||||
catch<U>(filter: (reason: any) => boolean, onRejected?: (reason: any) => Promise<U>): Promise<U>;
|
||||
catch<U>(filter: (reason: any) => boolean, onRejected?: (reason: any) => U): Promise<U>;
|
||||
|
||||
catch<U>(onRejected?: (reason: any) => Promise<U>): Promise<U>;
|
||||
catch<U>(onRejected?: (reason: any) => U): Promise<U>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user