import { EventEmitter } from 'events';
export interface BaseProgressEvent {
    type: string;
    startTime: number;
    endTime?: number;
}
export interface BaseCommandEvents<TProgress extends BaseProgressEvent = BaseProgressEvent, TDone = never> {
    stdout: (data: string) => void;
    stderr: (data: string) => void;
    progress: (event: TProgress) => void;
    error: (error: {
        exitCode: number;
        stderr: string;
        message: string;
    }) => void;
    done: TDone extends never ? never : (result: TDone) => void;
}
export declare abstract class BaseCommand<TProgress extends BaseProgressEvent = BaseProgressEvent, TDone = never> {
    protected events: EventEmitter<[never]>;
    private deferred;
    constructor();
    on<K extends keyof BaseCommandEvents<TProgress, TDone>>(event: K, listener: BaseCommandEvents<TProgress, TDone>[K]): void;
    off<K extends keyof BaseCommandEvents<TProgress, TDone>>(event: K, listener: BaseCommandEvents<TProgress, TDone>[K]): void;
    protected emit<K extends keyof BaseCommandEvents<TProgress, TDone>>(event: K, ...args: Parameters<BaseCommandEvents<TProgress, TDone>[K]>): void;
    output(): Promise<TDone>;
    abstract run(): Promise<void>;
    abstract kill(signal?: NodeJS.Signals): void;
}
//# sourceMappingURL=base-command.d.ts.map