/// <reference types="node" />
import * as colorette from 'colorette';
/**
 * A very minimal terminal spinner
 *
 * @license ISC
 * @copyright 2021 Usman Yunusov <usman.iunusov@gmail.com>
 * @see https://github.com/usmanyunusov/nanospinner/blob/master/index.js
 */
export declare class Spinner implements ISpinner {
    #private;
    constructor(text?: string, options?: SpinnerOptions);
    clear(): this;
    error(options?: {
        text?: string;
        mark?: string;
    }): this;
    reset(): this;
    spin(): this;
    start(opts?: Parameters<ISpinner['start']>[0]): this;
    stop(opts?: Parameters<ISpinner['stop']>[0]): this;
    success(opts?: Parameters<ISpinner['success']>[0]): this;
    update(opts?: Parameters<ISpinner['update']>[0]): this;
    private loop;
    private write;
    private render;
    private getLines;
}
interface SpinnerOptions {
    stream?: NodeJS.WriteStream;
    frames?: string[];
    interval?: number;
    text?: string;
    color?: keyof colorette.Colorette;
}
interface ISpinner {
    clear(): Spinner;
    error(opts?: {
        text?: string;
        mark?: string;
    }): Spinner;
    reset(): Spinner;
    spin(): Spinner;
    start(opts?: {
        text?: string;
        color?: keyof colorette.Colorette;
    }): Spinner;
    stop(opts?: {
        text?: string;
        mark?: string;
        color?: keyof colorette.Colorette;
    }): Spinner;
    success(opts?: {
        text?: string;
        mark?: string;
    }): Spinner;
    update(opts?: SpinnerOptions): Spinner;
}
export {};
