diff --git a/src/index.ts b/src/index.ts index 0c8023c..9301c09 100755 --- a/src/index.ts +++ b/src/index.ts @@ -23,7 +23,7 @@ export class TaskQueue extends EventEmitter { } private complete() { - const event: QueueCompleteEvent = { + const event: QueueCompleteEvent = { time: Date.now() - this.runStart, results: this.results, errors: this.errors.length !== 0 ? this.errors : undefined, @@ -223,13 +223,13 @@ export const ConsoleSubscriber = (queue: TaskQueue, verbose = false): (() => voi return unsubscribe; }; -export interface TaskQueue { - on(event: 'taskStart', listener: (ev: TaskStartEvent) => void): this; - on(event: 'taskSuccess', listener: (ev: TaskSuccessEvent) => void): this; +export interface TaskQueue { + on(event: 'taskStart', listener: (ev: TaskStartEvent) => void): this; + on(event: 'taskSuccess', listener: (ev: TaskSuccessEvent) => void): this; on(event: 'taskError', listener: (ev: TaskErrorEvent) => void): this; - on(event: 'taskCompleted', listener: (ev: TaskEvent) => void): this; + on(event: 'taskCompleted', listener: (ev: TaskEvent) => void): this; on(event: 'start', listener: (ev: QueueStartEvent) => void): this; - on(event: 'complete', listener: (ev: QueueCompleteEvent) => void): this; + on(event: 'complete', listener: (ev: QueueCompleteEvent) => void): this; } /** @@ -283,7 +283,7 @@ export interface TaskStartEvent { /** * Emmited when a task succeeds */ -export interface TaskSuccessEvent extends TaskEvent { +export interface TaskSuccessEvent extends TaskEvent { /** the error thrown */ result: RESULT; }