import * as React from 'react'; interface FallbackProps { error: Error; resetErrorBoundary: (...args: Array) => void; } interface ErrorBoundaryPropsWithComponent { onResetKeysChange?: (prevResetKeys: Array | undefined, resetKeys: Array | undefined) => void; onReset?: (...args: Array) => void; onError?: (error: Error, info: React.ErrorInfo) => void; resetKeys?: Array; fallback?: never; FallbackComponent: React.ComponentType; fallbackRender?: never; } declare function FallbackRender(props: FallbackProps): React.ReactElement | null; interface ErrorBoundaryPropsWithRender { onResetKeysChange?: (prevResetKeys: Array | undefined, resetKeys: Array | undefined) => void; onReset?: (...args: Array) => void; onError?: (error: Error, info: React.ErrorInfo) => void; resetKeys?: Array; fallback?: never; FallbackComponent?: never; fallbackRender: typeof FallbackRender; } interface ErrorBoundaryPropsWithFallback { onResetKeysChange?: (prevResetKeys: Array | undefined, resetKeys: Array | undefined) => void; onReset?: (...args: Array) => void; onError?: (error: Error, info: React.ErrorInfo) => void; resetKeys?: Array; fallback: React.ReactElement | null; FallbackComponent?: never; fallbackRender?: never; } type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender; type ErrorBoundaryState = { error: Error | null; }; declare class ErrorBoundary extends React.Component>, ErrorBoundaryState> { static getDerivedStateFromError(error: Error): { error: Error; }; state: ErrorBoundaryState; resetErrorBoundary: (...args: Array) => void; reset(): void; componentDidCatch(error: Error, info: React.ErrorInfo): void; componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void; render(): string | number | boolean | Iterable | import('./react/jsx-runtime.js').JSX.Element | null | undefined; } declare function useErrorHandler(givenError?: unknown): (error: unknown) => void; export { ErrorBoundary, useErrorHandler }; export type { FallbackProps, ErrorBoundaryPropsWithComponent, ErrorBoundaryPropsWithRender, ErrorBoundaryPropsWithFallback, ErrorBoundaryProps, };