/// <reference types="node" />
import Formatter from '../common/Formatter';
import Executor, { Events, Handle } from '../executors/Executor';
export default class Reporter implements ReporterProperties {
    readonly executor: Executor;
    protected _console: Console;
    protected _executor: Executor;
    protected _eventHandlers: {
        [eventName in keyof Events]: string;
    };
    protected _handles: Handle[];
    protected _output: ReporterOutput;
    constructor(executor: Executor, config?: ReporterOptions);
    console: Console;
    readonly formatter: Formatter;
    output: ReporterOutput;
    protected _registerEventHandlers(): void;
}
export declare function createEventHandler<E extends Events>(): (name?: keyof E) => <T extends keyof E>(target: any, propertyKey: T, _descriptor: TypedPropertyDescriptor<(data: E[T]) => void>) => void;
export declare const eventHandler: (name?: "error" | "*" | "afterRun" | "beforeRun" | "coverage" | "deprecated" | "internPath" | "log" | "runEnd" | "runStart" | "suiteEnd" | "suiteStart" | "testEnd" | "testStart") => <T extends "error" | "*" | "afterRun" | "beforeRun" | "coverage" | "deprecated" | "internPath" | "log" | "runEnd" | "runStart" | "suiteEnd" | "suiteStart" | "testEnd" | "testStart">(target: any, propertyKey: T, _descriptor: TypedPropertyDescriptor<(data: Events[T]) => void>) => void;
export interface ReporterProperties {
    output: ReporterOutput;
}
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;
}
