/// <reference types="node" />
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);
    console: Console;
    output: ReporterOutput;
    formatError(error: Error, options?: ErrorFormatOptions): string;
    protected _registerEventHandlers(): void;
}
export declare function createEventHandler<E extends Events, N extends NoDataEvents = NoDataEvents>(): () => {
    (target: any, propertyKey: N, _descriptor: TypedPropertyDescriptor<() => void | Promise<any>>): void;
    <T extends keyof E>(target: any, propertyKey: T, _descriptor: TypedPropertyDescriptor<(data: E[T]) => void | Promise<any>>): void;
};
export declare const eventHandler: () => {
    (target: any, propertyKey: NoDataEvents, _descriptor: TypedPropertyDescriptor<() => void | Promise<any>>): void;
    <T extends "error" | "warning" | "*" | "coverage" | "log" | "afterRun" | "beforeRun" | "deprecated" | "runEnd" | "runStart" | "suiteAdd" | "suiteEnd" | "suiteStart" | "testAdd" | "testEnd" | "testStart">(target: any, propertyKey: T, _descriptor: TypedPropertyDescriptor<(data: Events[T]) => void | Promise<any>>): void;
};
export interface ReporterProperties {
    output: ReporterOutput;
    console: Console;
}
export declare type ReporterOptions = Partial<ReporterProperties>;
export interface ReporterOutput {
    write(chunk: string | Buffer, encoding?: string, callback?: Function): void;
    end(chunk: string | Buffer, encoding?: string, callback?: Function): void;
}
