mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Add exception type filter using any
This commit is contained in:
5
when/when.d.ts
vendored
5
when/when.d.ts
vendored
@@ -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