/**
 * A single-line spinner. On an interactive TTY it animates in place; otherwise
 * it prints one line per state transition so logs stay readable and ordered.
 */
export declare class Spinner {
    private timer;
    private frame;
    private text;
    private readonly stream;
    private readonly interactive;
    private active;
    constructor(text: string);
    start(): this;
    update(text: string): this;
    succeed(text?: string): void;
    fail(text?: string): void;
    warn(text?: string): void;
    info(text?: string): void;
    stop(): void;
    private settle;
    private render;
    private teardown;
    private clearLine;
    private hideCursor;
    private showCursor;
}
/** Run `work` under a spinner, settling to success/failure automatically. */
export declare function withSpinner<T>(text: string, work: () => Promise<T>, options?: {
    success?: (value: T) => string;
    failure?: (error: unknown) => string;
}): Promise<T>;
