Merge pull request #11575 from Strate/bluebird_document_suppress_unhandled_rejections

[bluebird] document .suppressUnhandledRejections
This commit is contained in:
Vladimir Matveev
2016-09-28 22:02:28 -07:00
committed by GitHub
+7
View File
@@ -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.
*