import { Component, ReactNode } from 'react'; import { AbstractTranslatableError } from '@sisense/sdk-common'; /** * @internal */ interface ErrorBoundaryProps { showErrorBox?: boolean; error?: AbstractTranslatableError | Error | string; children: ReactNode; resetKeys?: any[]; onError?: (error: Error) => void | ReactNode; isContainerComponent?: boolean; /** If set to true, children will be rendered when an error is provided via props, but not when caught during rendering */ shouldRenderChildrenWithProvidedError?: boolean; } type ErrorBoundaryState = { error: AbstractTranslatableError | Error | string | null; customErrorUI: ReactNode | null; }; /** * This component is used to catch errors thrown by the UI component and display an error message * * @param props - component properties * @param props.children - The chart to render * @returns A ErrorBoundaryBox component with specific error message * @internal */ export declare class ErrorBoundary extends Component { showErrorBox: boolean; onError?: (error: Error) => void | ReactNode; isContainerComponent: boolean; constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(error: Error): { error: Error; customErrorUI: null; }; componentDidCatch(error: Error): void; componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void; render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined; } export {};