import { TNoopDefine } from '@flatbiz/utils';

export interface ErrorBoundaryProps {
	message?: React.ReactNode;
	description?: React.ReactNode;
	children?: React.ReactNode;
	onRenderReset?: TNoopDefine;
	/** 栈消息最大高度，默认值200 */
	stackMaxHeight?: number | "auto";
}
export interface ErrorBoundaryStates {
	error?: Error | null;
	info?: {
		componentStack?: string;
	};
}
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryStates> {
	state: {
		error: undefined;
		info: {
			componentStack: string;
		};
	};
	componentDidCatch(error: Error | null, info: object): void;
	render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
}
/**
 * react 异常拦截
 */
export declare const ErrorBoundaryWrapper: typeof ErrorBoundary;

export {};
