@open-formulieren/formio-builder
Version:
An opinionated Formio webform builder for Open Forms
21 lines (20 loc) • 639 B
TypeScript
import { default as React } from 'react';
export interface ErrorBoundaryProps {
children: React.ReactNode;
}
interface StateWithoutError {
hasError: false;
error: null;
}
interface StateWithError {
hasError: true;
error: Error;
}
type ErrorBoundaryState = StateWithError | StateWithoutError;
export default class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
constructor(props: ErrorBoundaryProps);
static getDerivedStateFromError(error: Error): StateWithError;
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
render(): React.ReactNode;
}
export {};