/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { Component, type ErrorInfo, type ReactNode } from 'react'; export interface ErrorBoundaryProps { children: ReactNode; } interface ErrorBoundaryState { error: Error | null; } /** * React Error Boundary that catches rendering errors in East UI components. * Displays EastError details (including source locations) using StatusDisplay. * * @remarks * `componentDidUpdate` clears the error when `children` changes, so a * transient render exception followed by a successful re-render shows up * as a brief "flash" of the error UI. We always `console.error` the caught * exception so the failure is preserved even when the visual flash is too * fast to read. */ export declare class ErrorBoundary extends Component { constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(error: Error): ErrorBoundaryState; componentDidCatch(error: Error, info: ErrorInfo): void; componentDidUpdate(prevProps: ErrorBoundaryProps): void; render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable | Promise | import("react").ReactElement> | import("react").ReactPortal | null | undefined> | null | undefined; } export {}; //# sourceMappingURL=ErrorBoundary.d.ts.map