/** * Error message templates and localization support for validation errors */ export interface ErrorMessageTemplate { code: string; template: string; description: string; severity: "error" | "warning" | "info"; category: "structure" | "format" | "content" | "syntax" | "metadata"; actionable: boolean; suggestion?: string; documentation?: string; } export interface ErrorMessageContext { format?: string; filePath?: string; line?: number; column?: number; value?: any; expected?: any; actual?: any; [key: string]: any; } /** * Error message templates organized by category */ export declare const errorMessageTemplates: Record; /** * Error message formatter with template interpolation and localization support */ export declare class ErrorMessageFormatter { private static locale; private static customTemplates; /** * Set the locale for error messages (for future localization) */ static setLocale(locale: string): void; /** * Register custom error message templates */ static registerCustomTemplates(templates: Record): void; /** * Format an error message with context interpolation */ static formatMessage(code: string, context?: ErrorMessageContext): string; /** * Get detailed error information including suggestions and documentation */ static getErrorDetails(code: string): ErrorMessageTemplate | null; /** * Format a complete error message with details and suggestions */ static formatDetailedMessage(code: string, context?: ErrorMessageContext): string; /** * Get error severity level */ static getErrorSeverity(code: string): "error" | "warning" | "info"; /** * Check if an error is actionable (can be fixed by the user) */ static isActionable(code: string): boolean; /** * Get errors by category */ static getErrorsByCategory(category: string): ErrorMessageTemplate[]; /** * Interpolate template variables with context values */ private static interpolateTemplate; /** * Create a formatted error message for display in CLI or UI */ static createDisplayMessage(code: string, context?: ErrorMessageContext, includeDetails?: boolean): string; /** * Get icon for severity level */ private static getSeverityIcon; /** * Create a summary of validation results */ static createValidationSummary(errors: Array<{ code: string; message: string; }>, warnings: Array<{ code: string; message: string; }>): string; }