///
import { Events, Executor, NoDataEvents, Handle } from '../executors/Executor';
import { ErrorFormatOptions } from '../common/ErrorFormatter';
export default class Reporter implements ReporterProperties {
readonly executor: Executor;
protected _console: Console | undefined;
protected _executor: Executor | undefined;
protected _handles: Handle[] | undefined;
protected _output: ReporterOutput | undefined;
protected _eventHandlers: {
[eventName: string]: string;
} | undefined;
constructor(executor: Executor, options?: ReporterOptions);
get console(): Console;
set console(value: Console);
get output(): ReporterOutput;
set output(value: ReporterOutput);
formatError(error: Error, options?: ErrorFormatOptions): string;
protected _registerEventHandlers(): void;
}
export declare function createEventHandler(): () => {
(target: any, propertyKey: N, _descriptor: TypedPropertyDescriptor<() => void | Promise>): void;
(target: any, propertyKey: T, _descriptor: TypedPropertyDescriptor<(data: E[T]) => void | Promise>): void;
};
export declare const eventHandler: () => {
(target: any, propertyKey: NoDataEvents, _descriptor: TypedPropertyDescriptor<() => void | Promise>): void;
(target: any, propertyKey: T, _descriptor: TypedPropertyDescriptor<(data: Events[T]) => void | Promise>): void;
};
export interface ReporterProperties {
output: ReporterOutput;
console: Console;
}
export declare type ReporterOptions = Partial;
export interface ReporterOutput {
write(chunk: string | Buffer, encoding?: string, callback?: Function): void;
end(chunk: string | Buffer, encoding?: string, callback?: Function): void;
}