import { ErrorCategory, ErrorHandlingStrategy, ErrorReportingConfig } from '../Types'; export declare class ErrorHandler { private static instance; private logger; private strategies; private reportingConfig; private constructor(); /** * Get the singleton instance of ErrorHandler */ static getInstance(): ErrorHandler; /** * Handle an error with optional context * @param error The error object * @param context Optional context information */ handleError(error: Error, context?: string): void; /** * Handle an asynchronous error * @param promise The promise that might throw an error * @param context Optional context information */ handleAsyncError(promise: Promise, context?: string): Promise; /** * Register global error handlers */ registerGlobalErrorHandlers(): void; /** * Set a handling strategy for a specific error category * @param category The error category * @param strategy The handling strategy function */ setStrategy(category: ErrorCategory, strategy: ErrorHandlingStrategy): void; /** * Categorize an error * @param error The error to categorize */ private categorizeError; /** * Configure error reporting * @param config The error reporting configuration */ configureErrorReporting(config: ErrorReportingConfig): void; /** * Report an error based on the current configuration * @param errorInfo The error information to report */ private reportError; /** * Attempt to recover from an error * @param error The error to recover from * @returns A boolean indicating whether recovery was successful */ attemptErrorRecovery(error: Error): boolean; }