import { Component, type ErrorInfo, type ReactNode } from 'react'; export interface ErrorBoundaryProps { children?: ReactNode; fallback?: ReactNode; onError?: (error: unknown, errorInfo: ErrorInfo) => void; } export interface ErrorBoundaryState { hasError: boolean; } /** * Component for declarative handling render errors via props. */ export declare class ErrorBoundary extends Component { static getDerivedStateFromError(): ErrorBoundaryState; constructor(props: ErrorBoundaryProps); /** @inheritdoc */ componentDidCatch(error: unknown, errorInfo: ErrorInfo): void; /** @inheritdoc */ render(): ReactNode; }