import { SourceLocation } from '@babel/code-frame'; import { LoggerFn } from '@cubejs-backend/shared'; import { UserError } from './UserError'; export type ErrorLikeObject = { message: string; }; export type PossibleError = Error | UserError | string | ErrorLikeObject; export interface CompilerErrorInterface { message: string; plainMessage?: string; fileName?: string; lineNumber?: string; position?: number; } export interface SyntaxErrorInterface { message: string; plainMessage?: string; loc?: SourceLocation | null | undefined; fileName?: string; } interface File { fileName: string; content: string; } export interface ErrorReporterOptions { logger: LoggerFn; } export declare class ErrorReporter { protected readonly parent: ErrorReporter | null; protected readonly context: any[]; protected readonly options: ErrorReporterOptions; protected warnings: SyntaxErrorInterface[]; protected errors: CompilerErrorInterface[]; protected file: File | null; constructor(parent?: ErrorReporter | null, context?: any[], options?: ErrorReporterOptions); exitFile(): void; inFile(file: File): void; warning(e: SyntaxErrorInterface, fileName?: string): void; syntaxError(e: SyntaxErrorInterface, fileName?: string): void; error(e: any, fileName?: any, lineNumber?: any, position?: any): void; inContext(context: string): ErrorReporter; private groupErrors; throwIfAny(): void; getErrors(): CompilerErrorInterface[]; addErrors(errors: PossibleError[], fileName?: string): void; getWarnings(): SyntaxErrorInterface[]; addWarnings(warnings: SyntaxErrorInterface[]): void; protected rootReporter(): ErrorReporter; } export {}; //# sourceMappingURL=ErrorReporter.d.ts.map