Skip to content

Commit 196537e

Browse files
authored
fix: ErrorBoundarySharedProps's info type (#156)
1 parent ad3d723 commit 196537e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
Component,
33
ComponentType,
4+
ErrorInfo,
45
FunctionComponent,
56
PropsWithChildren,
67
ReactElement,
@@ -15,7 +16,7 @@ export type FallbackProps = {
1516
};
1617

1718
type ErrorBoundarySharedProps = PropsWithChildren<{
18-
onError?: (error: Error, info: { componentStack: string }) => void;
19+
onError?: (error: Error, info: ErrorInfo) => void;
1920
onReset?: (
2021
details:
2122
| { reason: "imperative-api"; args: any[] }

0 commit comments

Comments
 (0)