@@ -3423,6 +3423,42 @@ References:
3423
3423
^^^^^^^^^^^^^^^^^^^^^ [2]
3424
3424
3425
3425
3426
+ Error ------------------------------------------------------------------------------------------ useEffect_hook.js:24:19
3427
+
3428
+ Cannot call `React.useEffect` with async function bound to `create` because a callable signature is missing in
3429
+ `Promise` [1] but exists in function type [2] in the return value.
3430
+
3431
+ useEffect_hook.js:24:19
3432
+ 24| React.useEffect(async () => {}) // Error: promise is incompatible with function return type
3433
+ ^^^^^^^^^^^^^^
3434
+
3435
+ References:
3436
+ useEffect_hook.js:24:30
3437
+ 24| React.useEffect(async () => {}) // Error: promise is incompatible with function return type
3438
+ ^ [1]
3439
+ <BUILTINS>/react.js:308:41
3440
+ 308| declare type MaybeCleanUpFn = void | (() => void);
3441
+ ^^^^^^^^^^ [2]
3442
+
3443
+
3444
+ Error ------------------------------------------------------------------------------------------ useEffect_hook.js:25:19
3445
+
3446
+ Cannot call `React.useEffect` with function bound to `create` because number [1] is incompatible with undefined [2] in
3447
+ the return value of the return value.
3448
+
3449
+ useEffect_hook.js:25:19
3450
+ 25| React.useEffect(() => () => 123) // Error: cleanup function should not return a value
3451
+ ^^^^^^^^^^^^^^^
3452
+
3453
+ References:
3454
+ useEffect_hook.js:25:31
3455
+ 25| React.useEffect(() => () => 123) // Error: cleanup function should not return a value
3456
+ ^^^ [1]
3457
+ <BUILTINS>/react.js:308:47
3458
+ 308| declare type MaybeCleanUpFn = void | (() => void);
3459
+ ^^^^ [2]
3460
+
3461
+
3426
3462
Error ---------------------------------------------------------------------------------- useImperativeHandle_hook.js:6:3
3427
3463
3428
3464
Cannot call `React.useImperativeHandle` because function [1] requires another argument.
@@ -3526,6 +3562,42 @@ References:
3526
3562
^^^^^^^^^^^^^^^^^^^^^ [2]
3527
3563
3528
3564
3565
+ Error ------------------------------------------------------------------------------------ useLayoutEffect_hook.js:24:25
3566
+
3567
+ Cannot call `React.useLayoutEffect` with async function bound to `create` because a callable signature is missing in
3568
+ `Promise` [1] but exists in function type [2] in the return value.
3569
+
3570
+ useLayoutEffect_hook.js:24:25
3571
+ 24| React.useLayoutEffect(async () => {}) // Error: promise is incompatible with function return type
3572
+ ^^^^^^^^^^^^^^
3573
+
3574
+ References:
3575
+ useLayoutEffect_hook.js:24:36
3576
+ 24| React.useLayoutEffect(async () => {}) // Error: promise is incompatible with function return type
3577
+ ^ [1]
3578
+ <BUILTINS>/react.js:308:41
3579
+ 308| declare type MaybeCleanUpFn = void | (() => void);
3580
+ ^^^^^^^^^^ [2]
3581
+
3582
+
3583
+ Error ------------------------------------------------------------------------------------ useLayoutEffect_hook.js:25:25
3584
+
3585
+ Cannot call `React.useLayoutEffect` with function bound to `create` because number [1] is incompatible with
3586
+ undefined [2] in the return value of the return value.
3587
+
3588
+ useLayoutEffect_hook.js:25:25
3589
+ 25| React.useLayoutEffect(() => () => 123) // Error: cleanup function should not return a value
3590
+ ^^^^^^^^^^^^^^^
3591
+
3592
+ References:
3593
+ useLayoutEffect_hook.js:25:37
3594
+ 25| React.useLayoutEffect(() => () => 123) // Error: cleanup function should not return a value
3595
+ ^^^ [1]
3596
+ <BUILTINS>/react.js:308:47
3597
+ 308| declare type MaybeCleanUpFn = void | (() => void);
3598
+ ^^^^ [2]
3599
+
3600
+
3529
3601
Error ---------------------------------------------------------------------------------------------- useMemo_hook.js:6:3
3530
3602
3531
3603
Cannot call `React.useMemo` because function [1] requires another argument.
@@ -4140,7 +4212,7 @@ References:
4140
4212
4141
4213
4142
4214
4143
- Found 242 errors
4215
+ Found 246 errors
4144
4216
4145
4217
Only showing the most relevant union/intersection branches.
4146
4218
To see all branches, re-run Flow with --show-all-branches
0 commit comments