/** * Representation for quint errors * * @author Gabriela Moreira * * @module */ import { ErrorTree } from './errorTree'; export interface QuintError { code: ErrorCode; message: string; reference?: bigint; trace?: bigint[]; data?: QuintErrorData; } export type ErrorCode = 'QNT000' | 'QNT001' | 'QNT002' | 'QNT003' | 'QNT004' | 'QNT005' | 'QNT006' | 'QNT007' | 'QNT008' | 'QNT009' | 'QNT012' | 'QNT013' | 'QNT014' | 'QNT015' | 'QNT016' | 'QNT098' | 'QNT099' | 'QNT101' | 'QNT102' | 'QNT200' | 'QNT201' | 'QNT202' | 'QNT203' | 'QNT204' | 'QNT205' | 'QNT206' | 'QNT404' | 'QNT405' | 'QNT406' | 'QNT407' | 'QNT408' | 'QNT409' | 'QNT500' | 'QNT501' | 'QNT502' | 'QNT503' | 'QNT504' | 'QNT505' | 'QNT506' | 'QNT507' | 'QNT508' | 'QNT509' | 'QNT510' | 'QNT511' | 'QNT512' | 'QNT513' | 'QNT514' | 'QNT515' | 'QNT516' | 'QNT517' | 'QNT600' | 'QNT601'; export interface QuintErrorData { fix?: QuintErrorFix; trace?: ErrorTree; } export type QuintErrorFix = { kind: 'replace'; original: string; replacement: string; }; /** Type predicate to check if an unknown error is a QuintError * * @param error the error to check * * @returns true if the error is a QuintError */ export declare function isQuintError(error: unknown): error is QuintError; /** Formats a Quint error as a string * * @param err the error to be formatted * * @returns a string representation of the error */ export declare function quintErrorToString(err: QuintError): string;