Files
klz-cables.com/.pnpm-store/v10/files/c0/544c1e511a47b53b31e7746885a79070fee90a9e64efa90a8baccd921490eee476f434a47639b6ce2893c442c030181bcaa61300e2737294df3dff45d12260
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

59 lines
2.7 KiB
Plaintext

import * as React from 'react';
interface FallbackProps {
error: Error;
resetErrorBoundary: (...args: Array<unknown>) => void;
}
interface ErrorBoundaryPropsWithComponent {
onResetKeysChange?: (prevResetKeys: Array<unknown> | undefined, resetKeys: Array<unknown> | undefined) => void;
onReset?: (...args: Array<unknown>) => void;
onError?: (error: Error, info: {
componentStack: string;
}) => void;
resetKeys?: Array<unknown>;
fallback?: never;
FallbackComponent: React.ComponentType<FallbackProps>;
fallbackRender?: never;
}
declare function FallbackRender(props: FallbackProps): React.ReactElement<unknown, string | React.FunctionComponent | typeof React.Component> | null;
interface ErrorBoundaryPropsWithRender {
onResetKeysChange?: (prevResetKeys: Array<unknown> | undefined, resetKeys: Array<unknown> | undefined) => void;
onReset?: (...args: Array<unknown>) => void;
onError?: (error: Error, info: {
componentStack: string;
}) => void;
resetKeys?: Array<unknown>;
fallback?: never;
FallbackComponent?: never;
fallbackRender: typeof FallbackRender;
}
interface ErrorBoundaryPropsWithFallback {
onResetKeysChange?: (prevResetKeys: Array<unknown> | undefined, resetKeys: Array<unknown> | undefined) => void;
onReset?: (...args: Array<unknown>) => void;
onError?: (error: Error, info: {
componentStack: string;
}) => void;
resetKeys?: Array<unknown>;
fallback: React.ReactElement<unknown, string | React.FunctionComponent | typeof React.Component> | null;
FallbackComponent?: never;
fallbackRender?: never;
}
declare type ErrorBoundaryProps = ErrorBoundaryPropsWithFallback | ErrorBoundaryPropsWithComponent | ErrorBoundaryPropsWithRender;
declare type ErrorBoundaryState = {
error: Error | null;
};
declare class ErrorBoundary extends React.Component<React.PropsWithRef<React.PropsWithChildren<ErrorBoundaryProps>>, ErrorBoundaryState> {
static getDerivedStateFromError(error: Error): {
error: Error;
};
state: ErrorBoundaryState;
resetErrorBoundary: (...args: Array<unknown>) => void;
reset(): void;
componentDidCatch(error: Error, info: React.ErrorInfo): void;
componentDidUpdate(prevProps: ErrorBoundaryProps, prevState: ErrorBoundaryState): void;
render(): React.ReactNode;
}
declare function withErrorBoundary<P>(Component: React.ComponentType<P>, errorBoundaryProps: ErrorBoundaryProps): React.ComponentType<P>;
declare function useErrorHandler(givenError?: unknown): (error: unknown) => void;
export { ErrorBoundary, withErrorBoundary, useErrorHandler };
export type { FallbackProps, ErrorBoundaryPropsWithComponent, ErrorBoundaryPropsWithRender, ErrorBoundaryPropsWithFallback, ErrorBoundaryProps, };