import React from "react"; type FallbackElement = React.ReactElement | null; export interface FallbackProps { error: Error; } interface ErrorBoundaryProps { fallback?: FallbackElement; onError?: (error: Error, info: string) => void; } interface ErrorBoundaryState { error: Error | null; } declare class ErrorBoundary extends React.Component, ErrorBoundaryState> { state: ErrorBoundaryState; static getDerivedStateFromError(error: Error): { error: Error; }; componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void; render(): React.ReactNode; } export default ErrorBoundary;