import type { ErrorEx, ErrorReporter } from '@ariestools/sdk-react-ui/error'; import type { ErrorInfo, ReactNode } from 'react'; import React, { Component } from 'react'; /** Properties accepted by the thrown error boundary component. */ export interface ThrownErrorBoundaryProps { /** Boundary name used by the thrown error boundary props. */ boundaryName?: string; /** Children used by the thrown error boundary props. */ children: ReactNode; /** Error component used by the thrown error boundary props. */ errorComponent?: (e: ErrorEx, boundaryName?: string) => ReactNode; /** Rethrow used by the thrown error boundary props. */ rethrow?: boolean; /** Rollbar used by the thrown error boundary props. */ rollbar?: ErrorReporter; /** Scope used by the thrown error boundary props. */ scope?: string; /** Title used by the thrown error boundary props. */ title?: string; } /** Error state maintained by the thrown-error boundary. */ export interface ThrownErrorBoundaryState { /** Error ex used by the thrown error boundary state. */ errorEx: ErrorEx | undefined; /** Has error used by the thrown error boundary state. */ hasError?: boolean; /** Xyo error used by the thrown error boundary state. */ xyoError?: T; } /** Class boundary that captures descendant errors and renders an error view or custom fallback. */ export declare class ThrownErrorBoundaryInner extends Component, ThrownErrorBoundaryState> { /** State used by the thrown error boundary inner. */ state: ThrownErrorBoundaryState; /** Returns derived state from error from the current error state. */ static getDerivedStateFromError(error: ErrorEx): ThrownErrorBoundaryState; /** Converts the captured error into the boundary's generic error payload. */ static normalizeError(error: ErrorEx): T; /** Reports the captured error and optionally rethrows it after logging. */ componentDidCatch(error: Error, errorInfo: ErrorInfo): void; /** Renders children until an error is captured, then renders the configured error view. */ render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | React.JSX.Element | null | undefined; } /** Catches descendant render errors and renders the configured fallback. */ export declare function ThrownErrorBoundary({ rollbar, ...props }: ThrownErrorBoundaryProps): React.JSX.Element; //# sourceMappingURL=ThrownErrorBoundary.d.ts.map