UNPKG

zent

Version:

一套前端设计语言和基于React的实现

9 lines (8 loc) 479 B
/// <reference types="react" /> import { IErrorBoundaryFallbackComponentProps } from './ErrorBoundary'; export interface ICatchErrorOption { onError?: (error: Error, componentStack: string) => void; FallbackComponent?: React.ComponentType<IErrorBoundaryFallbackComponentProps>; } declare function catchError({ FallbackComponent, onError }?: ICatchErrorOption): <P>(BaseComponent: import("react").ComponentType<P>) => (props: P) => JSX.Element; export default catchError;