File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 8
8
"import/no-unresolved": "off",
9
9
"react-hooks/rules-of-hooks": "off",
10
10
"@typescript-eslint/no-floating-promises": "off",
11
- "@typescript-eslint/no-unnecessary-condition": "off"
11
+ "@typescript-eslint/no-unnecessary-condition": "off",
12
+ "@typescript-eslint/no-invalid-void-type": "off"
12
13
},
13
14
"parserOptions": {
14
15
"project": ["./tsconfig.json", "./test/tsconfig.json"]
Original file line number Diff line number Diff line change @@ -42,14 +42,14 @@ function asyncUtils(addResolver: (callback: () => void) => void) {
42
42
await nextUpdatePromise
43
43
}
44
44
45
- const waitFor = async < T > (
46
- callback : ( ) => T | Promise < T > ,
45
+ const waitFor = async (
46
+ callback : ( ) => boolean | void ,
47
47
{ interval, timeout, suppressErrors = true } : WaitOptions = { }
48
48
) => {
49
49
const checkResult = ( ) => {
50
50
try {
51
51
const callbackResult = callback ( )
52
- return callbackResult || callbackResult === undefined
52
+ return callbackResult ?? callbackResult === undefined
53
53
} catch ( error : unknown ) {
54
54
if ( ! suppressErrors ) {
55
55
throw error as Error
You can’t perform that action at this time.
0 commit comments