mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-12 20:04:57 +02:00
32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
/// <reference types="@docusaurus/module-type-aliases" />
|
|
import React, { type ComponentProps } from 'react';
|
|
import type { Props as ErrorProps } from '@theme/Error';
|
|
export declare function ErrorBoundaryTryAgainButton(props: ComponentProps<'button'>): JSX.Element;
|
|
export declare function ErrorBoundaryErrorMessageFallback({ error, tryAgain, }: ErrorProps): JSX.Element;
|
|
export declare function ErrorBoundaryError({ error }: {
|
|
error: Error;
|
|
}): JSX.Element;
|
|
/**
|
|
* This component is useful to wrap a low-level error into a more meaningful
|
|
* error with extra context, using the ES error-cause feature.
|
|
*
|
|
* <ErrorCauseBoundary
|
|
* onError={(error) => new Error("extra context message",{cause: error})}
|
|
* >
|
|
* <RiskyComponent>
|
|
* </ErrorCauseBoundary>
|
|
*/
|
|
export declare class ErrorCauseBoundary extends React.Component<{
|
|
children: React.ReactNode;
|
|
onError: (error: Error, errorInfo: React.ErrorInfo) => Error;
|
|
}, unknown> {
|
|
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): never;
|
|
render(): React.ReactNode;
|
|
}
|
|
//# sourceMappingURL=errorBoundaryUtils.d.ts.map
|