UNPKG

@zllling/react-previewer

Version:

A React component for live code preview with compilation and error handling

17 lines 769 B
import { default as React, Component, ReactNode } from 'react'; interface Props { children: ReactNode; fallback?: ReactNode; } interface State { hasError: boolean; error?: Error; } export declare class ErrorBoundary extends Component<Props, State> { constructor(props: Props); static getDerivedStateFromError(error: Error): State; componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void; render(): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode>>; } export {}; //# sourceMappingURL=ErrorBoundary.d.ts.map