/** * Error Handler Utility * Provides consistent error handling and user-friendly messages */ import { ConversionError, ErrorCode } from '../types'; /** * Create a ConversionError with a specific error code */ export declare function createError(code: ErrorCode, details?: unknown, customMessage?: string): ConversionError; /** * Handle an error and return a ConversionError */ export declare function handleError(error: unknown): ConversionError; /** * Log error with details */ export declare function logError(error: ConversionError): void; /** * Wrap async function with error handling */ export declare function withErrorHandling(fn: () => Promise, errorCode?: ErrorCode): Promise; /** * Create a fallback handler for graceful degradation */ export declare function withFallback(fn: () => T, fallback: T, logWarning?: boolean): T; /** * Retry an async operation with exponential backoff */ export declare function withRetry(fn: () => Promise, maxRetries?: number, delayMs?: number): Promise; declare const _default: { createError: typeof createError; handleError: typeof handleError; logError: typeof logError; withErrorHandling: typeof withErrorHandling; withFallback: typeof withFallback; withRetry: typeof withRetry; }; export default _default; //# sourceMappingURL=error-handler.d.ts.map