Skip to content

Commit 0a10d4c

Browse files
authored
refactor(types.ts): remove unnecessary declare function FallbackRender (#204)
1 parent 9688d9f commit 0a10d4c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { ComponentType, ErrorInfo, PropsWithChildren, ReactNode } from "react";
22

3-
declare function FallbackRender(props: FallbackProps): ReactNode;
4-
53
export type FallbackProps = {
64
error: any;
75
resetErrorBoundary: (...args: any[]) => void;
@@ -26,7 +24,7 @@ export type ErrorBoundaryPropsWithComponent = ErrorBoundarySharedProps & {
2624
export type ErrorBoundaryPropsWithRender = ErrorBoundarySharedProps & {
2725
fallback?: never;
2826
FallbackComponent?: never;
29-
fallbackRender: typeof FallbackRender;
27+
fallbackRender: (props: FallbackProps) => ReactNode;
3028
};
3129

3230
export type ErrorBoundaryPropsWithFallback = ErrorBoundarySharedProps & {

0 commit comments

Comments
 (0)