missing Promise.nodeify() added

This commit is contained in:
cristian-harja
2014-08-07 18:24:18 +03:00
parent c773444c76
commit 86c0c56e6e
Vendored
+6 -1
View File
@@ -101,6 +101,11 @@ declare module Q {
*/
done(onFulfilled?: (value: T) => any, onRejected?: (reason: any) => any, onProgress?: (progress: any) => any): void;
/**
* If callback is a function, assumes it's a Node.js-style callback, and calls it as either callback(rejectionReason) when/if promise becomes rejected, or as callback(null, fulfillmentValue) when/if promise becomes fulfilled. If callback is not a function, simply returns promise.
*/
nodeify(callback: (reason: any, value: any) => void): void;
/**
* Returns a promise to get the named property of an object. Essentially equivalent to
*
@@ -161,7 +166,7 @@ declare module Q {
* Returns whether a given promise is in the pending state. When the static version is used on non-promises, the result is always false.
*/
isPending(): boolean;
valueOf(): any;
/**