import { LocationRange } from "../ast/types.js"; import { SerializedStackTrace, StackTrace, StackTraceFrame } from "../reducer/StackTrace.js"; import { ErrorMessage } from "./messages.js"; export declare class IRuntimeError extends Error { m: ErrorMessage; stackTrace: StackTrace; readonly type = "IRuntimeError"; private constructor(); static fromMessage(message: ErrorMessage, stackTrace: StackTrace): IRuntimeError; static fromException(err: unknown, stackTrace: StackTrace): IRuntimeError; toString({ withStackTrace, resolveSource, }?: { withStackTrace?: boolean; resolveSource?: (sourceId: string) => string | undefined; }): string; getFrameArray(): StackTraceFrame[]; serialize(): SerializedIRuntimeError; static deserialize(data: SerializedIRuntimeError): IRuntimeError; } type SerializedIRuntimeError = { type: "IRuntimeError"; message: ReturnType; stackTrace: SerializedStackTrace; }; export declare class ICompileError extends Error { message: string; location: LocationRange; readonly type = "ICompileError"; constructor(message: string, location: LocationRange); toString({ withLocation, resolveSource, }?: { withLocation?: boolean; resolveSource?: (sourceId: string) => string | undefined; }): string; toStringWithDetails(): string; serialize(): SerializedICompileError; } export type IError = ICompileError | IRuntimeError; type SerializedICompileError = { type: "ICompileError"; message: string; location: LocationRange; }; export type SerializedIError = SerializedICompileError | SerializedIRuntimeError; export declare function serializeIError(value: IError): SerializedIError; export declare function deserializeIError(value: SerializedIError): IError; export {}; //# sourceMappingURL=IError.d.ts.map