UNPKG

@stacksjs/launchpad

Version:
59 lines 1.55 kB
/** * Format bytes to human readable format */ export declare function formatBytes(bytes: number): string; /** * Format time in seconds to human readable format */ export declare function formatTime(seconds: number): string; export declare interface ProgressOptions { total?: number width?: number showPercentage?: boolean showSpeed?: boolean showETA?: boolean showBytes?: boolean } export declare interface ProgressState { current: number total: number startTime: number lastUpdate: number speed: number eta: number } export declare class ProgressBar { private state: ProgressState; private options: Required<ProgressOptions>; private lastLine: any; constructor(total?: any, options?: ProgressOptions); update(current: number, total?: number): void; complete(): void; private render(): void; } /** * Simple spinner for indeterminate progress */ export declare class Spinner { private frames: any; private interval: Timer | null; private currentFrame: any; private message: any; start(message?: any): void; stop(finalMessage?: string): void; update(message: string): void; } /** * Multi-line progress display for multiple concurrent operations */ export declare class MultiProgress { private bars: Map<string, ProgressBar>; private lines: string[]; private isActive: any; addBar(id: string, total?: any, options?: ProgressOptions): ProgressBar; removeBar(id: string): void; private render(): void; private getBarString(_bar: ProgressBar): string; start(): void; stop(): void; }