import { Component, type ComponentType, type ErrorInfo, type ForwardRefExoticComponent, type PropsWithoutRef, type RefAttributes } from 'react'; export interface ErrorBoundaryProps { children?: JSX.Children; fallback?: JSX.Node; onCatch?: (error: Error, errorInfo: ErrorInfo) => void; } type State = { hasError: boolean; error: any; }; /** * @see https://reactjs.org/docs/error-boundaries.html */ declare class ErrorBoundaryComponentClass extends Component { static displayName: string; static readonly aglyn = true; constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(error: Error): { hasError: boolean; error: Error; }; componentDidCatch(error: Error, errorInfo: ErrorInfo): void; render(): string | number | bigint | boolean | import("react").JSX.Element | Iterable | Promise> | Iterable>; } declare const ErrorBoundaryComponent: ForwardRefExoticComponent>; export declare function withErrorBoundary(WrappedComponent: ComponentType

, options?: ErrorBoundaryProps): ForwardRefExoticComponent & RefAttributes>; export { ErrorBoundaryComponent }; export default ErrorBoundaryComponent;