/** * Structured error types for parser operations * Provides consistent error handling across all parser modules */ /** * Base error class for parser-related errors * All parser errors extend this class for consistent error handling */ export declare class ParserError extends Error { readonly code: string; readonly context?: Record | undefined; /** * @param message - Human-readable error message * @param code - Machine-readable error code for error handling * @param context - Additional context data for debugging */ constructor(message: string, code: string, context?: Record | undefined); } /** * Error thrown when import depth exceeds maximum allowed depth * Prevents stack overflow from deeply nested or circular imports */ export declare class ImportDepthExceededError extends ParserError { /** * @param depth - Current import depth that exceeded the limit * @param maxDepth - Maximum allowed import depth * @param importPath - Path to the import that triggered the error */ constructor(depth: number, maxDepth: number, importPath: string); } /** * Error thrown when file resolution fails * Indicates that a file could not be found or accessed */ export declare class FileResolutionError extends ParserError { /** * @param path - Path to the file that failed to resolve * @param reason - Why the file could not be resolved */ constructor(path: string, reason: string); } /** * Error thrown when CSS parsing fails * Indicates malformed or invalid CSS content */ export declare class CSSParseError extends ParserError { /** * @param css - CSS content that failed to parse * @param reason - Why the CSS could not be parsed * @param position - Optional character position where parsing failed */ constructor(css: string, reason: string, position?: number); }