mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Fix declaration for 'denodeify' method in npm module 'promise' (#9521)
This commit is contained in:
committed by
Masahiro Wakame
parent
4cb464134d
commit
a02593d277
@@ -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);
|
||||
|
||||
Vendored
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user