mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 12:37:16 +08:00
Merge pull request #28405 from d-ph/simplify-bluebird-catch-typing
[bluebird] Simplify the "catch()" typing
This commit is contained in:
3
types/bluebird/index.d.ts
vendored
3
types/bluebird/index.d.ts
vendored
@@ -70,8 +70,7 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
*
|
||||
* Alias `.caught();` for compatibility with earlier ECMAScript version.
|
||||
*/
|
||||
catch(onReject: (error: any) => Resolvable<R>): Bluebird<R>;
|
||||
catch<U>(onReject: ((error: any) => Resolvable<U>) | undefined | null): Bluebird<U | R>;
|
||||
catch<U = R>(onReject: ((error: any) => Resolvable<U>) | undefined | null): Bluebird<U | R>;
|
||||
|
||||
/**
|
||||
* This extends `.catch` to work more like catch-clauses in languages like Java or C#.
|
||||
|
||||
Reference in New Issue
Block a user