export interface CompleteInfo<Res = void> {
    startTime: number;
    endTime: number;
    duration: number;
    error?: Error | string;
    success: boolean;
    result: Res;
}
export type CompletableFn<Res = void> = (arg: CompleteInfo<Res>) => void;
export interface CompletableControl<Res = void> {
    complete?: (res: Res) => void;
    error?: (err: Error | string) => void;
}
export declare class Completable<Res = never> {
    readonly startTime: number;
    protected _completeInfo?: CompleteInfo<Res>;
    private _onCompleteFns;
    constructor(control?: CompletableControl<Res>);
    get isComplete(): boolean;
    onComplete(cb: CompletableFn<Res>): void;
    protected _complete(result?: Res, err?: Error | string): void;
    protected complete(res?: Res): void;
    protected error(err?: Error | string): void;
}
