/*! Copyright 2024 the gnablib contributors MPL-1.1 */
export type Log = (msg: string) => void;
export declare class Cli {
    #private;
    readonly name: string;
    readonly descr: string;
    private readonly _prog;
    private _finalized;
    private _ver;
    private readonly _args;
    private readonly _aliasMap;
    private readonly _resIdx;
    private _error;
    private _errorLine;
    private _log;
    private _logError;
    private _errExitStatus;
    constructor(name: string, descr: string, log?: Log);
    private cyan;
    get hasError(): boolean;
    ver(ver?: number | string): Cli;
    require(key: string, descr: string, defValue?: string): Cli;
    flag(key: string, descr: string, value?: boolean, ...alts: string[]): Cli;
    private resolveAlias;
    removeOpt(...keys: string[]): Cli;
    removeAlt(...alts: string[]): Cli;
    private getOption;
    setOption(name: string, value: unknown): Cli;
    value(name: string): unknown | undefined;
    optionValue(name: string): unknown | undefined;
    optionValues(): [string, unknown][];
    private finalize;
    parse(start?: number, args?: string[]): Cli;
    error(msg: string, line?: string): void;
    ifComplete(next?: () => void): Cli;
    onError(v?: {
        target?: Log;
        exitStatus?: number;
    }): Cli;
    private renderKey;
    private renderArgs;
    private renderOpts;
    versionBlock(): string;
    helpBlock(): string;
}
