import { default as React, Component, ReactNode } from 'react'; import { ThemeContext } from 'styled-components'; interface ErrorBoundaryProps { children: ReactNode; onError?: (error: Error, errorInfo: React.ErrorInfo) => void; fallback?: ReactNode; windowId?: string; } interface ErrorBoundaryState { hasError: boolean; error: Error | null; errorInfo: React.ErrorInfo | null; } /** * Application error boundary component. * Catches errors in child components to prevent the whole desktop from crashing. */ export declare class ErrorBoundary extends Component { static contextType: React.Context; context: React.ContextType; constructor(props: ErrorBoundaryProps); static getDerivedStateFromError(error: Error): Partial; componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void; handleReset: () => void; render(): ReactNode; } export declare function withErrorBoundary

(Component: React.ComponentType

, errorBoundaryProps?: Omit): React.FC

; export default ErrorBoundary;