import { default as React } from 'react';
export interface ErrorBoundaryRenderProps {
    error: Error;
    reset: () => void;
}
export type ErrorBoundaryFallback = React.ReactNode | ((args: ErrorBoundaryRenderProps) => React.ReactNode);
export interface ErrorBoundaryProps {
    children: React.ReactNode;
    /** Fallback UI shown when a child throws. Pass a render fn to access `error` and `reset`. */
    fallback?: ErrorBoundaryFallback;
    /** Boundary resets when any value in this array changes (shallow compare). */
    resetKeys?: ReadonlyArray<unknown>;
    /** Side-effect hook for logging / Sentry. Runs in `componentDidCatch`. */
    onError?: (error: Error, info: React.ErrorInfo) => void;
}
interface ErrorBoundaryState {
    error: Error | null;
}
/**
 * Default fallback used when `<ErrorBoundary>` is rendered without a `fallback`
 * prop. Shows an inline `ErrorBlock` with a "Try again" button.
 *
 * The raw `error.message` is intentionally not rendered — it can include
 * implementation details or user data. Write a custom `fallback` if you need
 * to surface details (typically gated behind a dev flag).
 */
declare function DefaultFallback({ reset }: Readonly<ErrorBoundaryRenderProps>): React.JSX.Element;
/**
 * Catches render-time errors thrown by descendants and renders a fallback
 * instead of letting the error propagate to the nearest route-level boundary.
 *
 * Does NOT catch errors in event handlers, async callbacks, or SSR — wrap
 * those in `try/catch` yourself.
 *
 * @example
 * ```tsx
 * <ErrorBoundary fallback={<p>Couldn't load this section.</p>}>
 *   <FlakyChild />
 * </ErrorBoundary>
 * ```
 */
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
    static DefaultFallback: typeof DefaultFallback;
    state: ErrorBoundaryState;
    static getDerivedStateFromError(error: Error): ErrorBoundaryState;
    componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
    componentDidCatch(error: Error, info: React.ErrorInfo): void;
    reset: () => void;
    render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
}
export {};
//# sourceMappingURL=ErrorBoundary.d.ts.map