gebeya-dala-error-fixer
Version:
Automatic runtime error detection and fix suggestions for Next.js applications with config-based setup
20 lines (19 loc) • 719 B
TypeScript
import { Component, ReactNode, ErrorInfo as ReactErrorInfo } from 'react';
import { ErrorInfo, ErrorSuggestion } from './ErrorDetector';
interface ErrorBoundaryProps {
children: ReactNode;
onError: (error: ErrorInfo, suggestion: ErrorSuggestion) => void;
}
interface ErrorBoundaryState {
hasError: boolean;
}
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
private errorPatterns;
constructor(props: ErrorBoundaryProps);
private initializeErrorPatterns;
static getDerivedStateFromError(): ErrorBoundaryState;
componentDidCatch(error: Error, errorInfo: ReactErrorInfo): void;
private findSuggestion;
render(): ReactNode;
}
export {};