Fix declaration for 'denodeify' method in npm module 'promise' (#9521)

This commit is contained in:
Thierry Régagnon
2016-06-03 00:45:53 +09:00
committed by Masahiro Wakame
parent 4cb464134d
commit a02593d277
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -19,3 +19,9 @@ var prom3 = Promise.all([prom, prom2]);
prom3.then((resolve: Array<any>) => {
});
function withCallback(arg: any, cb: (e: Error, result: any) => void): void {
cb(null, arg);
}
var prom4 = Promise.denodeify(withCallback);
prom4('test').then(result => result);
+1 -1
View File
@@ -18,7 +18,7 @@ declare namespace Promise {
resolve: <T>(value: T) => IThenable<T>;
reject: <T>(value: T) => IThenable<T>;
all: (array: Array<IThenable<any>>) => IThenable<Array<any>>;
denodeify: (fn: Function) => IThenable<any>;
denodeify: (fn: Function) => (...args: any[]) => IThenable<any>;
nodeify: (fn: Function) => Function;
}