import { ErrorInfo, ReactNode, Component } from 'react'; import { ErrorBoundaryProps } from '../types/react/ErrorBoundaryProps'; interface ErrorBoundaryState { hasError: boolean; } /** * A render error boundary that isolates a failing subtree. * * Catches errors thrown during descendant render, shows the optional `fallback` * (nothing by default), and forwards the error to `onError` so the widget can * log it through its own logger. Written with the class API (no JSX) to match * the library's JSX-runtime-free build. */ export declare class ErrorBoundary extends Component { state: ErrorBoundaryState; /** * Flips into the error state when a descendant throws. * @returns {ErrorBoundaryState} The next state. */ static getDerivedStateFromError(): ErrorBoundaryState; /** * Forwards the caught error and component stack to the optional handler. * @param {Error} error - The thrown error. * @param {ErrorInfo} info - React error info (component stack). * @returns {void} Nothing. */ componentDidCatch(error: Error, info: ErrorInfo): void; /** * Renders the children, or the fallback once an error has been caught. * @returns {ReactNode} The children or fallback. */ render(): ReactNode; } export {}; //# sourceMappingURL=ErrorBoundary.d.ts.map