import React, { Component, ErrorInfo } from 'react';
import './error-boundary.less';
export type ErrorBoundaryProps = {
    children: React.ReactElement;
    fallback?: React.ReactElement;
    defaultFallbackText?: string;
    onCatch?: (error: Error, errorInfo: ErrorInfo) => void;
};
type ErrorBoundaryState = {
    hasError: boolean;
};
/**
 * ErrorBoundary is a class component that should wrap Suspense tags to catch errors thrown.
 * It is a simple class component that implements the componentDidCatch and
 * static getDerivedStateFromError methods, and renders a fallback when it encounters an error.
 */
export default class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
    constructor(props: ErrorBoundaryProps);
    static getDerivedStateFromError(): {
        hasError: boolean;
    };
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    render(): import("react/jsx-runtime").JSX.Element;
}
export {};
