@@ -26,16 +26,16 @@ jest.mock('@sentry/browser', () => {
2626 } ;
2727} ) ;
2828
29- function Boo ( { title } : { title : string } ) : React . JSX . Element {
29+ function Boo ( { title } : { title : string } ) : JSX . Element {
3030 throw new Error ( title ) ;
3131}
3232
33- function Bam ( ) : React . JSX . Element {
33+ function Bam ( ) : JSX . Element {
3434 const [ title ] = useState ( 'boom' ) ;
3535 return < Boo title = { title } /> ;
3636}
3737
38- function EffectSpyFallback ( { error } : { error : unknown } ) : React . JSX . Element {
38+ function EffectSpyFallback ( { error } : { error : unknown } ) : JSX . Element {
3939 const [ counter , setCounter ] = useState ( 0 ) ;
4040
4141 React . useEffect ( ( ) => {
@@ -50,10 +50,10 @@ function EffectSpyFallback({ error }: { error: unknown }): React.JSX.Element {
5050}
5151
5252interface TestAppProps extends ErrorBoundaryProps {
53- errorComp ?: React . JSX . Element ;
53+ errorComp ?: JSX . Element ;
5454}
5555
56- const TestApp : React . FC < TestAppProps > = ( { children, errorComp, ...props } ) => {
56+ const TestApp : React . FC < TestAppProps > = ( { children, errorComp, ...props } ) : any => {
5757 const customErrorComp = errorComp || < Bam /> ;
5858 const [ isError , setError ] = React . useState ( false ) ;
5959 return (
@@ -282,7 +282,7 @@ describe('ErrorBoundary', () => {
282282 it ( 'does not set cause if non Error objected is thrown' , ( ) => {
283283 const TestAppThrowingString : React . FC < ErrorBoundaryProps > = ( { children, ...props } ) => {
284284 const [ isError , setError ] = React . useState ( false ) ;
285- function StringBam ( ) : React . JSX . Element {
285+ function StringBam ( ) : JSX . Element {
286286 throw 'bam' ;
287287 }
288288 return (
@@ -333,7 +333,7 @@ describe('ErrorBoundary', () => {
333333 it ( 'handles when `error.cause` is nested' , ( ) => {
334334 const mockOnError = jest . fn ( ) ;
335335
336- function CustomBam ( ) : React . JSX . Element {
336+ function CustomBam ( ) : JSX . Element {
337337 const firstError = new Error ( 'bam' ) ;
338338 const secondError = new Error ( 'bam2' ) ;
339339 const thirdError = new Error ( 'bam3' ) ;
@@ -378,7 +378,7 @@ describe('ErrorBoundary', () => {
378378 it ( 'handles when `error.cause` is recursive' , ( ) => {
379379 const mockOnError = jest . fn ( ) ;
380380
381- function CustomBam ( ) : React . JSX . Element {
381+ function CustomBam ( ) : JSX . Element {
382382 const firstError = new Error ( 'bam' ) ;
383383 const secondError = new Error ( 'bam2' ) ;
384384 // @ts -expect-error Need to set cause on error
0 commit comments