import { Component } from 'react'; import * as PropTypes from 'prop-types'; export declare class TryCatch extends Component<{ try: () => any; catch: (error: Error, errorInfo: any) => any; onError?: (error: Error, errorInfo: any) => any; }, { hasError: boolean; error: Error | null; errorInfo: any; }> { static propTypes: { try: PropTypes.Validator<(...args: any[]) => any>; catch: PropTypes.Validator<(...args: any[]) => any>; onError: PropTypes.Requireable<(...args: any[]) => any>; }; state: { hasError: boolean; error: any; errorInfo: any; }; componentDidCatch(error: Error | null, errorInfo: any): void; render(): any; }