From c48c6ff985ad6c2dc12976c86fc959bf56bad48c Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Thu, 10 Dec 2015 13:42:29 -0600 Subject: [PATCH] Fix Bluebird nodeify() when not passed callback .nodeify() will return the Promise it was called on, not void, when no callback is passed. --- bluebird/bluebird.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluebird/bluebird.d.ts b/bluebird/bluebird.d.ts index da3b9902a3..f3420957a3 100644 --- a/bluebird/bluebird.d.ts +++ b/bluebird/bluebird.d.ts @@ -117,7 +117,7 @@ declare class Promise implements Promise.Thenable, Promise.Inspection { * Returns back this promise instead of creating a new one. If the `callback` argument is not a function, this method does not do anything. */ nodeify(callback: (err: any, value?: R) => void, options?: Promise.SpreadOption): Promise; - nodeify(...sink: any[]): void; + nodeify(...sink: any[]): Promise; /** * Marks this promise as cancellable. Promises by default are not cancellable after v0.11 and must be marked as such for `.cancel()` to have any effect. Marking a promise as cancellable is infectious and you don't need to remark any descendant promise.