import React from 'react'; import type { ErrorInfo } from 'react'; export interface Props { fallback: Fallback; children: React.ReactNode; } export type Fallback = React.ComponentType<{ error: Error; resetError: () => void; }>; export type State = { didCatch: false; error: null; } | { didCatch: true; error: Error; }; export declare class ErrorBoundary extends React.Component { constructor(props: Props); static getDerivedStateFromError(error: Error): State; resetError: () => void; componentDidCatch(error: Error, errorInfo: ErrorInfo): void; render(): React.ReactNode; }