Merge pull request #28405 from d-ph/simplify-bluebird-catch-typing

[bluebird] Simplify the "catch()" typing
This commit is contained in:
Armando Aguirre
2018-08-27 13:17:30 -07:00
committed by GitHub

View File

@@ -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#.