import React from 'react';
export interface OSMErrorBoundaryProps {
children: React.ReactNode;
/** Called when an error is caught. */
onError?: (error: Error, errorInfo: React.ErrorInfo) => void;
/** Custom fallback UI. Receives the caught error and a retry callback. */
fallback?: (error: Error, retry: () => void) => React.ReactNode;
}
interface OSMErrorBoundaryState {
error: Error | null;
}
/**
* Error boundary for map components.
*
* Wrap OSMView (or any part of your map UI) with OSMErrorBoundary to
* guarantee that a map failure renders a fallback instead of unmounting
* the host app's React tree.
*
* ```tsx
*
*
*
* ```
*/
export declare class OSMErrorBoundary extends React.Component {
state: OSMErrorBoundaryState;
static getDerivedStateFromError(error: Error): OSMErrorBoundaryState;
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
private retry;
render(): React.ReactNode;
}
export default OSMErrorBoundary;
//# sourceMappingURL=OSMErrorBoundary.d.ts.map