import { Component, type ReactNode } from 'react'; type ErrorBoundaryProps = { children: ReactNode; fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode); onError?: (error: Error, errorInfo: React.ErrorInfo) => void; }; type ErrorBoundaryState = { error: Error | null; }; /** * A client-side error boundary component for React applications. * * Usage: * ```tsx * // With a static fallback * Something went wrong

}> * *
* * // With a dynamic fallback that receives the error and reset function * ( *
*

Error: {error.message}

* *
* )} * > * *
* ``` */ export declare class ErrorBoundary extends Component { constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(error: Error): ErrorBoundaryState; componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void; resetError(): void; render(): ReactNode; } export {};