react-error-boundary
Advanced tools
Comparing version
import { ComponentType, ErrorInfo, PropsWithChildren, ReactNode } from "react"; | ||
declare function FallbackRender(props: FallbackProps): ReactNode; | ||
export type FallbackProps = { | ||
@@ -27,3 +26,3 @@ error: any; | ||
FallbackComponent?: never; | ||
fallbackRender: typeof FallbackRender; | ||
fallbackRender: (props: FallbackProps) => ReactNode; | ||
}; | ||
@@ -30,0 +29,0 @@ export type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & { |
@@ -1,3 +0,3 @@ | ||
import { RefAttributes, ForwardRefExoticComponent, PropsWithoutRef, ComponentType } from "react"; | ||
import { RefAttributes, ForwardRefExoticComponent, PropsWithoutRef, ComponentType, ComponentRef, ComponentProps } from "react"; | ||
import { ErrorBoundaryProps } from "./types.js"; | ||
export declare function withErrorBoundary<Props extends object>(component: ComponentType<Props>, errorBoundaryProps: ErrorBoundaryProps): ForwardRefExoticComponent<PropsWithoutRef<Props> & RefAttributes<any>>; | ||
export declare function withErrorBoundary<T extends ComponentType<any>>(component: T, errorBoundaryProps: ErrorBoundaryProps): ForwardRefExoticComponent<PropsWithoutRef<ComponentProps<T>> & RefAttributes<ComponentRef<T>>>; |
{ | ||
"name": "react-error-boundary", | ||
"version": "4.1.2", | ||
"version": "5.0.0", | ||
"description": "Simple reusable React error boundary component", | ||
@@ -63,11 +63,11 @@ "author": "Brian Vaughn <brian.david.vaughn@gmail.com>", | ||
"@types/jest": "^26.0.15", | ||
"@types/react": "^18", | ||
"@types/react": "^18.3.17", | ||
"@types/react-dom": "^18", | ||
"@typescript-eslint/eslint-plugin": "^5.52.0", | ||
"assert": "^2.0.0", | ||
"eslint": "^8.0.1", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint": "^9.13.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.25.2", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"eslint-plugin-react": "^7.33.1", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"eslint-plugin-react": "^7.37.2", | ||
"globals": "^15.11.0", | ||
"jest": "^29.4.3", | ||
@@ -80,3 +80,4 @@ "jest-environment-jsdom": "^29.4.3", | ||
"ts-jest": "^29.0.5", | ||
"typescript": "^5.1.6" | ||
"typescript": "^5.1.6", | ||
"typescript-eslint": "^8.18.0" | ||
}, | ||
@@ -83,0 +84,0 @@ "peerDependencies": { |
32628
0.03%23
4.55%672
-0.15%