@iminside/react-yandex-maps
Version:
Yandex.Maps API bindings for React
13 lines (12 loc) • 423 B
TypeScript
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>>;