From a4a33e265cf12ce775a9a0e54897fdabf2f6b3ce Mon Sep 17 00:00:00 2001 From: Artur Eshenbrener Date: Wed, 28 Sep 2016 19:20:57 +0300 Subject: [PATCH] [bluebird] document .suppressUnhandledRejections http://bluebirdjs.com/docs/api/suppressunhandledrejections.html --- bluebird/bluebird.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bluebird/bluebird.d.ts b/bluebird/bluebird.d.ts index 35b506542a..3dc66b78f0 100644 --- a/bluebird/bluebird.d.ts +++ b/bluebird/bluebird.d.ts @@ -317,6 +317,13 @@ class Bluebird implements Bluebird.Thenable, Bluebird.Inspection { */ 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. *