import { Component, ErrorInfo, ReactNode } from 'react'; type TErrorBoundaryProps = { children: ReactNode; }; type TErrorBoundaryState = { hasError: boolean; }; /** * BlockNote 編輯器的錯誤邊界 * * custom block 的 toExternalHTML 會經 portal + flushSync 掛在主 React tree,一旦 render * throw,React 18 會把整棵樹 unmount 造成白屏;瀏覽器翻譯/廣告攔截等擴充也可能改動 * contenteditable DOM 觸發例外。用 ErrorBoundary 攔下錯誤、顯示可重試的 fallback, * 避免整頁崩潰。 */ export declare class ErrorBoundary extends Component { constructor(props: TErrorBoundaryProps); static getDerivedStateFromError(): TErrorBoundaryState; componentDidCatch(error: Error, info: ErrorInfo): void; handleReset: () => void; render(): string | number | boolean | Iterable | import("react").JSX.Element | null | undefined; } export {};