mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
missing Promise.nodeify() added
This commit is contained in:
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user