import React, { ErrorInfo } from "react"; export interface ErrorBoundaryHandleArguments { error: Error; errorInfo: ErrorInfo; } export type ErrorBoundaryHandleError = (args: ErrorBoundaryHandleArguments) => void; export interface ErrorBoundaryProps { children?: React.ReactNode; onError?: ErrorBoundaryHandleError; fallback?: React.ReactNode | ((props: ErrorBoundaryHandleArguments) => React.JSX.Element); } export type ErrorBoundaryState = { hasError: true; error: Error; errorInfo: ErrorInfo; } | { hasError?: false; error?: undefined; errorInfo?: undefined; }; export declare class ErrorBoundary extends React.Component { constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(): { hasError: boolean; }; componentDidCatch(error: Error, errorInfo: ErrorInfo): void; render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | import("@emotion/react/jsx-runtime").JSX.Element | null | undefined; }