mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
bluebird: Update fromCallback API
This commit is contained in:
@@ -766,6 +766,13 @@ func = Promise.promisify(f, obj);
|
||||
obj = Promise.promisifyAll(obj);
|
||||
anyProm = Promise.fromNode(callback => nodeCallbackFunc(callback));
|
||||
anyProm = Promise.fromNode(callback => nodeCallbackFuncErrorOnly(callback));
|
||||
anyProm = Promise.fromNode(callback => nodeCallbackFunc(callback), {multiArgs : true});
|
||||
anyProm = Promise.fromNode(callback => nodeCallbackFuncErrorOnly(callback), {multiArgs : true});
|
||||
|
||||
anyProm = Promise.fromCallback(callback => nodeCallbackFunc(callback));
|
||||
anyProm = Promise.fromCallback(callback => nodeCallbackFuncErrorOnly(callback));
|
||||
anyProm = Promise.fromCallback(callback => nodeCallbackFunc(callback), {multiArgs : true});
|
||||
anyProm = Promise.fromCallback(callback => nodeCallbackFuncErrorOnly(callback), {multiArgs : true});
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
Vendored
+2
-1
@@ -137,7 +137,8 @@ interface PromiseConstructor {
|
||||
/**
|
||||
* Returns a promise that is resolved by a node style callback function.
|
||||
*/
|
||||
fromNode(resolver: (callback: (err: any, result?: any) => void) => void): Promise<any>;
|
||||
fromNode(resolver: (callback: (err: any, result?: any) => void) => void, options? : {multiArgs? : boolean}): Promise<any>;
|
||||
fromCallback(resolver: (callback: (err: any, result?: any) => void) => void, options? : {multiArgs? : boolean}): Promise<any>;
|
||||
|
||||
/**
|
||||
* Returns a function that can use `yield` to run asynchronous code synchronously. This feature requires the support of generators which are drafted in the next version of the language. Node version greater than `0.11.2` is required and needs to be executed with the `--harmony-generators` (or `--harmony`) command-line switch.
|
||||
|
||||
Reference in New Issue
Block a user