import { Component, ErrorInfo, ReactNode } from 'react'; export type ErrorBoundaryFallbackRenderer = (error: Error, reset: () => void) => ReactNode; export interface ErrorBoundaryProps { children: ReactNode; /** Custom fallback UI. Either a static node or a render function that also gets a `reset` callback. */ fallback?: ReactNode | ErrorBoundaryFallbackRenderer; /** Called once when a render error is caught, in addition to the default console.error. */ onError?: (error: Error, errorInfo: ErrorInfo) => void; } interface ErrorBoundaryState { error: Error | null; } /** * Catches render-time errors from a malformed/edge-case spec so they can't escape * into the host application's React tree (React error boundaries only catch * synchronous render errors — async failures, e.g. in AsyncAPIRenderer's parse * step, are handled separately via diagnostics). */ export declare class ErrorBoundary extends Component { state: ErrorBoundaryState; static getDerivedStateFromError(error: Error): ErrorBoundaryState; componentDidCatch(error: Error, errorInfo: ErrorInfo): void; reset: () => void; render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | import("react").JSX.Element | null | undefined; } export {};