import { Component, PropsWithChildren } from "react"; interface ErrorBoundaryProps { onError?: (error: Error) => void; } interface ErrorBoundaryState { error?: Error; } /** * ErrorBoundary is a component that catches rendering errors in its children * and displays an appropriately-styled error message. * * @see https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary */ export default class ErrorBoundary extends Component, ErrorBoundaryState> { constructor(props: PropsWithChildren); static getDerivedStateFromError(error: unknown): ErrorBoundaryState; componentDidCatch(error: Error): void; render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | import("react").JSX.Element | null | undefined; } export {};