import * as react_jsx_runtime from 'react/jsx-runtime'; import * as React from 'react'; type ErrorBoundaryState = { didCatch: true; error: any; } | { didCatch: false; error: null; }; interface ErrorBoundaryContextValue { didCatch: boolean; error: any; resetErrorBoundary: (...args: any[]) => void; } declare class ErrorBoundary extends React.Component { constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(error: Error): { didCatch: boolean; error: Error; }; resetErrorBoundary(...args: any[]): void; componentDidCatch(error: Error, info: React.ErrorInfo): void; componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void; render(): react_jsx_runtime.JSX.Element; } type FallbackProps = { error: any; resetErrorBoundary: (...args: any[]) => void; }; type ErrorBoundarySharedProps = React.PropsWithChildren<{ onError?: (error: Error, info: React.ErrorInfo) => void; onReset?: (details: { reason: "imperative-api"; args: any[]; } | { reason: "keys"; prev: any[] | undefined; next: any[] | undefined; }) => void; resetKeys?: any[]; }>; type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & { fallback?: never; FallbackComponent: React.ComponentType; fallbackRender?: never; }; type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & { fallback?: never; FallbackComponent?: never; fallbackRender: (props: FallbackProps) => React.ReactNode; }; type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & { fallback: React.ReactNode; FallbackComponent?: never; fallbackRender?: never; }; type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender; export { ErrorBoundary, type ErrorBoundaryContextValue, type ErrorBoundaryProps, type ErrorBoundaryPropsWithComponent, type ErrorBoundaryPropsWithFallback, type ErrorBoundaryPropsWithRender, type FallbackProps };