From 7e4a947c6bb9a1ec798d3decab0a6c9f67649901 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Mon, 28 Oct 2024 21:15:52 +0900 Subject: [PATCH] refactor(types.ts): remove unnecessary declare function FallbackRender --- src/types.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/types.ts b/src/types.ts index f32ec13..550ad13 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,7 +1,5 @@ import { ComponentType, ErrorInfo, PropsWithChildren, ReactNode } from "react"; -declare function FallbackRender(props: FallbackProps): ReactNode; - export type FallbackProps = { error: any; resetErrorBoundary: (...args: any[]) => void; @@ -26,7 +24,7 @@ export type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & { export type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & { fallback?: never; FallbackComponent?: never; - fallbackRender: typeof FallbackRender; + fallbackRender: (props: FallbackProps) => ReactNode; }; export type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {