UNPKG

narraleaf-react

Version:

A React visual novel player framework

26 lines (25 loc) 994 B
import React, { ErrorInfo, ReactNode } from "react"; interface ErrorBoundaryProps { children: ReactNode; onError?: (error: Error, errorInfo: ErrorInfo) => void; } interface ErrorBoundaryState { hasError: boolean; error: Error | null; errorInfo: ErrorInfo | null; } export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> { static getDerivedStateFromError(error: Error): { hasError: boolean; error: Error; errorInfo: null; }; state: { hasError: boolean; error: null; errorInfo: null; }; componentDidCatch(error: Error, errorInfo: ErrorInfo): void; render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined; } export {};