mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add exception type filter using any
This commit is contained in:
Vendored
+5
@@ -56,6 +56,11 @@ 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>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user