import cliProgress, { SingleBar } from 'cli-progress'; export interface IProgressItem { name: string; rawName: string; index: number; path: string; href: string; imageList: string[]; imageListPath: string[]; } export type IProgress = IProgressItem[]; export default class ProgressBar { bookPath: string; progressFilePath: string; progressInfo: IProgress; curr: number; total: number; isDownloadInterrupted: boolean; multiBar: cliProgress.MultiBar | null; bar: cliProgress.SingleBar | null; completePromise: Promise | null; ignoreConsole: boolean; constructor(bookPath: string, total: number, ignoreConsole?: boolean); init(): Promise; getProgress(): Promise; updateProgress(progressItem: IProgressItem, isSuccess: boolean): Promise; resetProgressInfo(updateProgressInfo: IProgressItem[]): Promise; multiBarCreate(params: { total: number; file: string; }): cliProgress.SingleBar | undefined; multiBarUpdate(curBar: SingleBar | undefined): void; multiBarRemove(curBar: SingleBar | undefined): void; pause(): void; continue(line: number): void; clearLine(line: number): void; }