File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 88 "import/no-unresolved": "off",
99 "react-hooks/rules-of-hooks": "off",
1010 "@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"
1213 },
1314 "parserOptions": {
1415 "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) {
4242 await nextUpdatePromise
4343 }
4444
45- const waitFor = async < T > (
46- callback : ( ) => T | Promise < T > ,
45+ const waitFor = async (
46+ callback : ( ) => boolean | void ,
4747 { interval, timeout, suppressErrors = true } : WaitOptions = { }
4848 ) => {
4949 const checkResult = ( ) => {
5050 try {
5151 const callbackResult = callback ( )
52- return callbackResult || callbackResult === undefined
52+ return callbackResult ?? callbackResult === undefined
5353 } catch ( error : unknown ) {
5454 if ( ! suppressErrors ) {
5555 throw error as Error
You can’t perform that action at this time.
0 commit comments