/// import { PassThrough } from 'stream'; import { MessageName } from './MessageName'; import { Locator } from './types'; export declare class ReportError extends Error { reportCode: MessageName; constructor(code: MessageName, message: string); } export declare function isReportError(error: Error): error is ReportError; export declare type ProgressDefinition = { progress: number; title?: string; }; export declare abstract class Report { private reportedInfos; private reportedWarnings; private reportedErrors; abstract reportCacheHit(locator: Locator): void; abstract reportCacheMiss(locator: Locator, message?: string): void; abstract startTimerPromise(what: string, cb: () => Promise): Promise; abstract startTimerSync(what: string, cb: () => T): T; abstract startCacheReport(cb: () => Promise): Promise; abstract reportSeparator(): void; abstract reportInfo(name: MessageName | null, text: string): void; abstract reportWarning(name: MessageName, text: string): void; abstract reportError(name: MessageName, text: string): void; abstract reportProgress(progress: AsyncIterable): Promise & { stop: () => void; }; abstract reportJson(data: any): void; abstract finalize(): void; static progressViaCounter(max: number): { [Symbol.asyncIterator](): AsyncGenerator<{ progress: number; }, void, unknown>; set: (n: number) => void; tick: (n?: number) => void; }; reportInfoOnce(name: MessageName, text: string, opts?: { key?: any; }): void; reportWarningOnce(name: MessageName, text: string, opts?: { key?: any; }): void; reportErrorOnce(name: MessageName, text: string, opts?: { key?: any; }): void; reportExceptionOnce(error: Error | ReportError): void; createStreamReporter(prefix?: string | null): PassThrough; }