From 4862dcd46dc51e389fb9290fa27315a6a1079e02 Mon Sep 17 00:00:00 2001 From: Joe Herman Date: Tue, 13 Oct 2015 12:17:18 -0400 Subject: [PATCH] async: Remove error requirement in series, parallel. --- async/async.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/async/async.d.ts b/async/async.d.ts index 78523d9c6..6054e9a47 100644 --- a/async/async.d.ts +++ b/async/async.d.ts @@ -10,7 +10,7 @@ interface AsyncResultCallback { (err: Error, result: T): void; } interface AsyncResultArrayCallback { (err: Error, results: T[]): void; } interface AsyncResultObjectCallback { (err: Error, results: Dictionary): void; } -interface AsyncFunction { (callback: (err: Error, result?: T) => void): void; } +interface AsyncFunction { (callback: (err?: Error, result?: T) => void): void; } interface AsyncIterator { (item: T, callback: ErrorCallback): void; } interface AsyncForEachOfIterator { (item: T, key: number, callback: ErrorCallback): void; } interface AsyncResultIterator { (item: T, callback: AsyncResultCallback): void; } @@ -126,7 +126,7 @@ interface Async { during(test: (testCallback : (error: Error, truth: boolean) => void) => void, fn: AsyncVoidFunction, callback: (err: any) => void): void; doDuring(fn: AsyncVoidFunction, test: (testCallback: (error: Error, truth: boolean) => void) => void, callback: (err: any) => void): void; forever(next: (errCallback : (err: Error) => void) => void, errBack: (err: Error) => void) : void; - waterfall(tasks: Function[], callback?: (err: Error, result: any) => void): void; + waterfall(tasks: Function[], callback?: (err: Error, results?: any) => void): void; compose(...fns: Function[]): void; seq(...fns: Function[]): void; applyEach(fns: Function[], argsAndCallback: any[]): void; // applyEach(fns, args..., callback). TS does not support ... for a middle argument. Callback is optional.