import React from "react"; export interface ErrorInfo { componentStack: string; errorBoundary?: string; timestamp: number; } export interface ErrorState { hasError: boolean; error: Error | null; errorInfo: ErrorInfo | null; errorId: string | null; retryCount: number; } export interface ErrorBoundaryOptions { maxRetries?: number; resetOnPropsChange?: boolean; resetTimeout?: number; onError?: (error: Error, errorInfo: ErrorInfo) => void; onReset?: () => void; fallback?: React.ComponentType<{ error: Error; errorInfo: ErrorInfo; retry: () => void; }>; } /** * Enhanced error boundary hook with retry logic and error reporting */ export declare function useErrorBoundary(options?: ErrorBoundaryOptions): { captureError: (error: Error, errorInfo?: Partial) => void; resetError: () => void; retry: () => void; withErrorBoundary:

(Component: React.ComponentType

, fallback?: React.ComponentType<{ error: Error; errorInfo: ErrorInfo; retry: () => void; }>) => React.ForwardRefExoticComponent & React.RefAttributes>; canRetry: boolean; hasError: boolean; error: Error | null; errorInfo: ErrorInfo | null; errorId: string | null; retryCount: number; }; /** * Hook for async error handling with retry logic */ export declare function useAsyncError(): { error: Error | null; isRetrying: boolean; retryCount: number; captureAsyncError: (error: Error) => void; retryAsync: (asyncFn: () => Promise, maxRetries?: number) => Promise; clearError: () => void; }; /** * Hook for graceful degradation */ export declare function useGracefulDegradation(primaryFeature: () => T, fallbackFeature: () => T, testCondition: () => boolean): T; /** * Hook for error reporting and analytics */ export declare function useErrorReporting(options?: { enableReporting?: boolean; endpoint?: string; apiKey?: string; userId?: string; sessionId?: string; }): { reportError: (error: Error, context?: { component?: string; action?: string; metadata?: Record; }) => Promise; }; //# sourceMappingURL=useErrorBoundary.d.ts.map