mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
Add exception type filter using any
This commit is contained in:
1 parent
cc7b89066e
commit
b4de422678
1 file changed
+5
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