import { Component, ComponentType, ErrorInfo, ReactNode } from 'react';
import { FallbackProps } from './Fallback';
export interface BoundaryProps {
    /** The children to render. */
    children?: ReactNode;
    /** Custom fallback component to render when an error occurs. */
    FallbackComponent?: ComponentType<FallbackProps>;
    /** Callback invoked when an error is caught. */
    onError?: (error: Error, info: ErrorInfo) => void;
    /** Callback invoked when the error boundary resets. */
    onReset?: () => void;
}
interface BoundaryState {
    error: Error | null;
    componentStack: string | null;
}
/**
 * Error boundary component that catches errors in its children and displays a fallback
 * UI. Implemented as a React class component to use componentDidCatch lifecycle.
 */
export declare class Boundary extends Component<BoundaryProps, BoundaryState> {
    state: BoundaryState;
    static getDerivedStateFromError(error: Error): Partial<BoundaryState>;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    resetErrorBoundary: () => void;
    render(): ReactNode;
}
export {};
//# sourceMappingURL=Boundary.d.ts.map