/** * XML module error types. */ import { BaseError } from "../../utils/errors.js"; import type { BaseErrorOptions } from "../../utils/errors.js"; /** * Base class for all XML-related errors. */ export declare class XmlError extends BaseError { name: string; } /** * Error thrown during XML parsing (SAX or DOM). */ export declare class XmlParseError extends XmlError { name: string; readonly line?: number; readonly column?: number; readonly fileName?: string; constructor(message: string, context?: { line?: number; column?: number; fileName?: string; }, options?: BaseErrorOptions); } /** * Error thrown during XML writing when the writer is in an invalid state. */ export declare class XmlWriteError extends XmlError { name: string; readonly operation: string; readonly state: string; constructor(operation: string, state: string, options?: BaseErrorOptions); } /** Check if an error is an XmlError. */ export declare function isXmlError(err: unknown): err is XmlError; /** Check if an error is an XmlParseError. */ export declare function isXmlParseError(err: unknown): err is XmlParseError;