import { Circuit, CompileResult, Diagnostics } from './types.js'; /** * Custom error class for handling Summon compilation errors. * Extends the built-in Error class and includes additional metadata * related to the compilation process, such as the circuit and diagnostics. */ export default class CompileError extends Error { circuit?: Circuit; diagnostics: Diagnostics; /** * @param {string} message - The error message. * @param {CompileResult} compileResult - The result of the compilation process, containing circuit and diagnostics. */ constructor(message: string, compileResult: CompileResult); } /** * Extracts the first error message from the diagnostics. * Iterates over the diagnostics object to find the first error or internal error message. * * @param {Diagnostics} diagnostics - The diagnostics object containing compilation messages. * @returns {string | undefined} - The first error message found, or undefined if no error is present. */ export declare function getErrorFromDiagnostic(diagnostics: Diagnostics): string | undefined; //# sourceMappingURL=compileError.d.ts.map