easy-cli-framework
Version: 
A framework for building CLI applications that are robust and easy to maintain. Supports theming, configuration files, interactive prompts, and more.
52 lines (51 loc) • 1.32 kB
TypeScript
import { DisplayOptions, EasyCLITheme } from '.';
import { Ora } from 'ora';
/**
 * A class to handle themed spinners
 *
 * @class ThemedSpinner
 *
 * @param {EasyCLITheme} theme The theme to use
 * @param {DisplayOptions} displayOptions The display options for the spinner
 *
 * @example
 * ```typescript
 * const theme = new EasyCLITheme();
 * const spinner = new ThemedSpinner(theme, 'default');
 * spinner.start('Loading...');
 * ```
 */
export declare class ThemedSpinner {
    private theme;
    private displayOptions;
    private spinner;
    /**
     * Creates an instance of ThemedSpinner
     * @param {EasyCLITheme} theme The theme to use
     * @param {DisplayOptions} displayOptions The display options for the spinner
     */
    constructor(theme: EasyCLITheme | null, displayOptions: DisplayOptions);
    /**
     * Starts the spinner
     *
     * @param {string} text The text to display
     * @param {Partial<Ora>} [options={}] The options for the spinner
     *
     * @returns {Ora} The spinner instance
     *
     * @example
     * ```typescript
     * spinner.start('Loading...');
     * ```
     */
    start(text: string, options?: Partial<Ora>): Ora;
    /**
     * Stops the spinner
     *
     * @example
     * ```typescript
     * spinner.stop();
     * ```
     */
    stop(): void;
}