Skip to content

Commit

Permalink
chore: ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Apr 2, 2024
1 parent 4c46bc0 commit db350f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/flow/src/components/ErrorBoundary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export const UNKNOWN_COMPONENT = 'unknown';

export type FallbackRender = (errorData: {
error: Error;
componentStack: string | null;
eventId: string | null;
componentStack: string | null | undefined;
eventId: string | null | undefined;
resetError(): void;
}) => React.ReactElement;

Expand All @@ -37,27 +37,27 @@ export type ErrorBoundaryProps = {
/** Called if resetError() is called from the fallback render props function */
onReset?(
error: Error | null,
componentStack: string | null,
eventId: string | null,
componentStack: string | null | undefined,
eventId: string | null | undefined,
): void;
/** Called on componentWillUnmount() */
onUnmount?(
error: Error | null,
componentStack: string | null,
eventId: string | null,
componentStack: string | null | undefined,
eventId: string | null | undefined,
): void;
/** Called before the error is captured by Sentry, allows for you to add tags or context using the scope */
beforeCapture?(
scope: any,
error: Error | null,
componentStack: string | null,
componentStack: string | null | undefined,
): void;
};

type ErrorBoundaryState = {
componentStack: React.ErrorInfo['componentStack'] | null;
error: Error | null;
eventId: string | null;
eventId: string | null | undefined;
};

const INITIAL_STATE = {
Expand Down

0 comments on commit db350f2

Please sign in to comment.