UNPKG

@iminside/react-yandex-maps

Version:
13 lines (12 loc) 423 B
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>>;