mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 11:41:44 +00:00
caolan/async: add missing optional type to 'retry' (#9506)
* async: add function type to interval of 'retry' * fix return type number
This commit is contained in:
committed by
Masahiro Wakame
parent
18ae8e8b46
commit
2901b0c3c4
@@ -378,6 +378,7 @@ async.auto({
|
||||
|
||||
async.retry(3, function (callback, results) { }, function (err, result) { });
|
||||
async.retry({ times: 3, interval: 200 }, function (callback, results) { }, function (err, result) { });
|
||||
async.retry({ times: 3, interval: (retryCount) => { return 200 * retryCount; } }, function (callback, results) { }, function (err, result) { });
|
||||
|
||||
|
||||
async.parallel([
|
||||
|
||||
Vendored
+1
-1
@@ -136,7 +136,7 @@ interface Async {
|
||||
cargo(worker : (tasks: any[], callback : ErrorCallback) => void, payload? : number) : AsyncCargo;
|
||||
auto(tasks: any, callback?: (error: Error, results: any) => void): void;
|
||||
retry<T>(opts: number, task: (callback : AsyncResultCallback<T>, results: any) => void, callback: (error: Error, results: any) => void): void;
|
||||
retry<T>(opts: { times: number, interval: number }, task: (callback: AsyncResultCallback<T>, results : any) => void, callback: (error: Error, results: any) => void): void;
|
||||
retry<T>(opts: { times: number, interval: number|((retryCount: number) => number) }, task: (callback: AsyncResultCallback<T>, results : any) => void, callback: (error: Error, results: any) => void): void;
|
||||
iterator(tasks: Function[]): Function;
|
||||
apply(fn: Function, ...arguments: any[]): AsyncFunction<any>;
|
||||
nextTick(callback: Function): void;
|
||||
|
||||
Reference in New Issue
Block a user