@dhlab/error-boundary
Version:
A universal React error boundary library that works with any router
18 lines • 921 B
TypeScript
import type { AxiosError } from "axios";
import { HTTPError } from "ky";
import type React from "react";
import { type ErrorBoundaryProps } from "react-error-boundary";
import type { TPartialErrorConfig } from "../types/api-error";
export type TIgnoreErrorType = string | number | ((error: HTTPError | AxiosError) => boolean);
export type TApiErrorBoundaryProps = {
children: React.ReactNode;
FallbackContainer?: React.ComponentType<{
children: React.ReactNode;
}>;
Button?: React.ComponentType<React.ComponentProps<"button">>;
overrideConfig?: TPartialErrorConfig;
resetKeys?: ErrorBoundaryProps["resetKeys"];
ignoreError?: TIgnoreErrorType[];
};
export declare function ApiErrorBoundary({ children, FallbackContainer, Button, overrideConfig, resetKeys, ignoreError, }: TApiErrorBoundaryProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=api-error-boundary.d.ts.map