import * as React from 'react'; import { ReactNode } from 'react'; import './TS_ErrorBoundary.scss'; import { Logger } from '@nu-art/ts-common'; import { BaseComponent } from '../../core/ComponentBase.js'; type State = { error?: Error; controlled?: boolean; errorInfo?: React.ErrorInfo; }; type Props = React.PropsWithChildren<{ logger?: Logger; component?: BaseComponent; onClick?: (e: any) => void; renderer?: (e: any) => ReactNode; error?: Error; }>; export declare class TS_ErrorBoundary extends React.Component { constructor(props: Props); /** * Called on changes in props. * @param props * @param state */ static getDerivedStateFromProps(props: Props, state: State): State; /** * Called when a descendant component throws an error (and there isn't an error boundary in the way already) * used to return a state based on the error * @param error */ static getDerivedStateFromError(error: Error): { error: Error; }; /** * Called when a descendant component throws an error (and there isn't an error boundary in the way already) * Can be used to return a state based on the error, but will be deprecated at some point, so watch out. * @param error * @param errorInfo */ componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void; /** * Returns true. * This component's props will not change unless an error has occurred, but the children component might need to * because their props might have changed. therefore, inorder not to block their lifecycle, this component must always update. * @param nextProps * @param nextState * @param nextContext */ shouldComponentUpdate(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean; private defaultRenderer; render(): string | number | boolean | Iterable | import("react/jsx-runtime").JSX.Element | null | undefined; protected onErrorBoundaryClick: (e: React.MouseEvent) => void; } export {};