UNPKG

yuque-dl

Version:
22 lines (21 loc) 761 B
import cliProgress from 'cli-progress'; import type { IProgress, IProgressItem } from '../types'; export declare class ProgressBar { bookPath: string; progressFilePath: string; progressInfo: IProgress; curr: number; total: number; isDownloadInterrupted: boolean; bar: cliProgress.SingleBar | null; completePromise: Promise<void> | null; incremental: boolean; disableProgressJSON: boolean; constructor(bookPath: string, total: number, incremental?: boolean, disableProgressJSON?: boolean); init(): Promise<void>; getProgress(): Promise<IProgress>; updateProgress(progressItem: IProgressItem, isSuccess: boolean): Promise<void>; pause(): void; continue(): void; clearLine(line: number): void; }