import type { Message } from 'esbuild';
import ts from 'typescript';
export interface EsbuildDiagnosticOutput {
    pretty: string;
    standard: string;
}
export interface EsbuildDiagnosticMessage {
    type: 'error' | 'warning';
    message: Message;
}
export interface WorkerDiagnosticsMessage {
    type: 'diagnostic' | 'summary';
    diagnostics: readonly EsbuildDiagnosticMessage[];
    output: EsbuildDiagnosticOutput;
}
export interface WorkerBuildMessage {
    type: 'build';
}
export interface WorkerStartMessage {
    type: 'start';
    build?: boolean;
    watch?: boolean;
}
export interface WorkerDoneMessage {
    type: 'done';
    errorCount: number;
    duration: number;
}
export type WorkerMessage = WorkerDiagnosticsMessage | WorkerBuildMessage | WorkerStartMessage | WorkerDoneMessage;
export declare class Reporter {
    private readonly basedir;
    private readonly postMessage;
    private start;
    constructor(basedir: string, postMessage?: (msg: WorkerMessage) => void);
    markBuildStart(): void;
    reportBuildStart: ({ build, watch }?: {
        build?: boolean;
        watch?: boolean;
    }) => void;
    reportBuildDone: (errorCount: number) => void;
    reportDiagnostic: (diagnostic: ts.Diagnostic) => void;
    reportDiagnostics: (diagnostics: readonly ts.Diagnostic[]) => void;
    reportSummaryDiagnostic: (diagnostic: ts.Diagnostic) => void;
    private static readonly formatHost;
    private static extractErrorCount;
    private static getOutput;
    private static transformDiagnostics;
}
