import React, { ErrorInfo, ReactNode } from "react";
type ErrorBoundaryProps = {
    fallBackUI?: ReactNode;
    children?: ReactNode;
};
type ErrorBoundaryState = {
    hasError: boolean;
};
/**
 * Something like a try catch in React component form with some exceptions. Catches Errors and logs them to the central
 * logger. Prevents uncaught exceptions on the render of child components from unintentionally breaking the entire UI.
 * Has the added benefit of sending the errors to the Central Logger
 *
 * Note: The exceptions are that it not catch errors in Event handlers and Asynchronous code.
 * Note: This does not catch errors in the current component directly, only child components. See below for example
 *
 * Eg: WON'T WORK
 *
 * const ContainerComponent = ({test}:any) => <ErrorBoundary><div>{test.undefined.length}</div></ErrorBoundary>
 *
 * WILL WORK:
 * const BrokenComponent = ({test}:any) => <div>{test.undefined.length}</div>
 * const ContainerComponent = ({test}:any) => <ErrorBoundary><BrokenComponent test={test}/></ErrorBoundary>
 *
 * @see https://reactjs.org/docs/error-boundaries.html for more information on Error Boundaries
 */
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
    constructor(props: ErrorBoundaryProps);
    static getDerivedStateFromError(): {
        hasError: boolean;
    };
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    render(): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
}
export {};
//# sourceMappingURL=ErrorBoundary.d.ts.map