PromoCursed/node_modules/antd/lib/alert/ErrorBoundary.d.ts
2024-08-20 23:25:37 +04:00

25 lines
701 B
TypeScript

import * as React from 'react';
interface ErrorBoundaryProps {
message?: React.ReactNode;
description?: React.ReactNode;
children?: React.ReactNode;
id?: string;
}
interface ErrorBoundaryStates {
error?: Error | null;
info?: {
componentStack?: string;
};
}
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryStates> {
state: {
error: undefined;
info: {
componentStack: string;
};
};
componentDidCatch(error: Error | null, info: object): void;
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
}
export default ErrorBoundary;