mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 09:01:45 +08:00
[bluebird] document .suppressUnhandledRejections
http://bluebirdjs.com/docs/api/suppressunhandledrejections.html
This commit is contained in:
7
bluebird/bluebird.d.ts
vendored
7
bluebird/bluebird.d.ts
vendored
@@ -317,6 +317,13 @@ class Bluebird<R> implements Bluebird.Thenable<R>, Bluebird.Inspection<R> {
|
||||
*/
|
||||
cancel(): void;
|
||||
|
||||
/**
|
||||
* Basically sugar for doing: somePromise.catch(function(){});
|
||||
*
|
||||
* Which is needed in case error handlers are attached asynchronously to the promise later, which would otherwise result in premature unhandled rejection reporting.
|
||||
*/
|
||||
suppressUnhandledRejections(): void;
|
||||
|
||||
/**
|
||||
* Start the chain of promises with `Promise.try`. Any synchronous exceptions will be turned into rejections on the returned promise.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user