import React, { Component, ComponentType, ErrorInfo, ReactNode } from "react"; //#region src/lib/error-boundary.d.ts interface ErrorBoundaryFallbackProps { error: Error; reset: () => void; } type ErrorBoundaryFallbackComponent = ComponentType; interface ErrorBoundaryResetDetails { reason: "imperative-api" | "keys-changed"; prev?: unknown[]; next?: unknown[]; } interface ErrorBoundaryProps { children: ReactNode; FallbackComponent: ErrorBoundaryFallbackComponent; onError?: (error: Error, info: ErrorInfo) => void; onReset?: (details: ErrorBoundaryResetDetails) => void; resetKeys?: unknown[]; } interface ErrorBoundaryState { error: Error | null; } declare class ErrorBoundary extends Component { constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(error: Error): ErrorBoundaryState; componentDidCatch(error: Error, info: ErrorInfo): void; componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void; reset: () => void; render(): React.ReactNode; } declare function GlobalErrorElement({ reset }: ErrorBoundaryFallbackProps): React.ReactElement; //#endregion export { ErrorBoundaryResetDetails as a, ErrorBoundaryProps as i, ErrorBoundaryFallbackComponent as n, GlobalErrorElement as o, ErrorBoundaryFallbackProps as r, ErrorBoundary as t };