import React from 'react';
import { AnyObject } from '../util/typing';
export interface ErrorBoundaryProps {
  onError?: (err: Error) => void;
}
/**
 * Prevent map tree crashing if components throw an error
 * @param Component
 */
export declare const withErrorBoundary: <TProps extends AnyObject>(
  Component: React.FC<React.PropsWithChildren<TProps>>
) => React.FC<React.PropsWithChildren<TProps & ErrorBoundaryProps>>;
