import React, { Component, type ReactNode } from 'react'; export interface ErrorBoundaryProps { /** Children to catch errors from */ children: ReactNode; /** Classname to wrap the error message with */ className?: string; /** Callback for when an error occurs */ onError?: (error: Error, errorInfo: React.ErrorInfo) => void; /** Custom fallback element */ fallback?: ReactNode; } export interface ErrorBoundaryState { error?: Error; } /** * Error boundary for catching render errors in React. Displays an error message if an error is caught by default, or you can specify a fallback component to render. * https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary */ export declare class ErrorBoundary extends Component { static getDerivedStateFromError(error: Error): ErrorBoundaryState; constructor(props: ErrorBoundaryProps); componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void; render(): ReactNode; } export default ErrorBoundary; //# sourceMappingURL=ErrorBoundary.d.ts.map