@@ -23,12 +23,12 @@ export type FallbackRender = (errorData: {
23
23
export type ErrorBoundaryProps = {
24
24
children ?: React . ReactNode | ( ( ) => React . ReactNode ) ;
25
25
/** If a Sentry report dialog should be rendered on error */
26
- showDialog ?: boolean ;
26
+ showDialog ?: boolean | undefined ;
27
27
/**
28
28
* Options to be passed into the Sentry report dialog.
29
29
* No-op if {@link showDialog} is false.
30
30
*/
31
- dialogOptions ?: ReportDialogOptions ;
31
+ dialogOptions ?: ReportDialogOptions | undefined ;
32
32
/**
33
33
* A fallback component that gets rendered when the error boundary encounters an error.
34
34
*
@@ -37,17 +37,17 @@ export type ErrorBoundaryProps = {
37
37
* the error, the component stack, and an function that resets the error boundary on error.
38
38
*
39
39
*/
40
- fallback ?: React . ReactElement | FallbackRender ;
40
+ fallback ?: React . ReactElement | FallbackRender | undefined ;
41
41
/** Called when the error boundary encounters an error */
42
- onError ?( error : Error , componentStack : string , eventId : string ) : void ;
42
+ onError ?: ( ( error : Error , componentStack : string , eventId : string ) => void ) | undefined ;
43
43
/** Called on componentDidMount() */
44
- onMount ?( ) : void ;
44
+ onMount ?: ( ( ) => void ) | undefined ;
45
45
/** Called if resetError() is called from the fallback render props function */
46
- onReset ?( error : Error | null , componentStack : string | null , eventId : string | null ) : void ;
46
+ onReset ?: ( ( error : Error | null , componentStack : string | null , eventId : string | null ) => void ) | undefined ;
47
47
/** Called on componentWillUnmount() */
48
- onUnmount ?( error : Error | null , componentStack : string | null , eventId : string | null ) : void ;
48
+ onUnmount ?: ( ( error : Error | null , componentStack : string | null , eventId : string | null ) => void ) | undefined ;
49
49
/** Called before the error is captured by Sentry, allows for you to add tags or context using the scope */
50
- beforeCapture ?( scope : Scope , error : Error | null , componentStack : string | null ) : void ;
50
+ beforeCapture ?: ( ( scope : Scope , error : Error | null , componentStack : string | null ) => void ) | undefined ;
51
51
} ;
52
52
53
53
type ErrorBoundaryState =
0 commit comments