File tree 9 files changed +12
-10
lines changed
angular-query-experimental/src/util
query-async-storage-persister/src
query-sync-storage-persister/src
9 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ export function shouldThrowError<T extends (...args: Array<any>) => boolean>(
10
10
return ! ! throwError
11
11
}
12
12
13
- export function noop ( ) { }
13
+ export function noop ( ) : void { }
Original file line number Diff line number Diff line change 1
- export function noop ( ) { }
1
+ export function noop ( ) : void { }
Original file line number Diff line number Diff line change 1
- export function noop ( ) { }
1
+ export function noop ( ) : void { }
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export function useBaseQuery<
88
88
React . useCallback (
89
89
( onStoreChange ) => {
90
90
const unsubscribe = isRestoring
91
- ? ( ) => undefined
91
+ ? noop
92
92
: observer . subscribe ( notifyManager . batchCalls ( onStoreChange ) )
93
93
94
94
// Update result to make sure we did not miss any query updates
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
20
20
shouldSuspend ,
21
21
willFetch ,
22
22
} from './suspense'
23
+ import { noop } from './utils'
23
24
import type {
24
25
DefinedUseQueryResult ,
25
26
UseQueryOptions ,
@@ -280,7 +281,7 @@ export function useQueries<
280
281
React . useCallback (
281
282
( onStoreChange ) =>
282
283
isRestoring
283
- ? ( ) => undefined
284
+ ? noop
284
285
: observer . subscribe ( notifyManager . batchCalls ( onStoreChange ) ) ,
285
286
[ observer , isRestoring ] ,
286
287
) ,
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ export function shouldThrowError<T extends (...args: Array<any>) => boolean>(
10
10
return ! ! throwError
11
11
}
12
12
13
- export function noop ( ) { }
13
+ export function noop ( ) : void { }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
13
13
} from 'solid-js'
14
14
import { useQueryClient } from './QueryClientProvider'
15
15
import { useIsRestoring } from './isRestoring'
16
+ import { noop } from './utils'
16
17
import type { CreateQueryResult , SolidQueryOptions } from './types'
17
18
import type { Accessor } from 'solid-js'
18
19
import type { QueryClient } from './QueryClient'
@@ -305,10 +306,10 @@ export function createQueries<
305
306
} )
306
307
} )
307
308
308
- let unsubscribe : ( ) => void = ( ) => undefined
309
+ let unsubscribe = noop
309
310
createComputed < ( ) => void > ( ( cleanup ) => {
310
311
cleanup ?.( )
311
- unsubscribe = isRestoring ( ) ? ( ) => undefined : subscribeToObserver ( )
312
+ unsubscribe = isRestoring ( ) ? noop : subscribeToObserver ( )
312
313
// cleanup needs to be scheduled after synchronous effects take place
313
314
return ( ) => queueMicrotask ( unsubscribe )
314
315
} )
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ export function shouldThrowError<T extends (...args: Array<any>) => boolean>(
10
10
return ! ! throwError
11
11
}
12
12
13
- export function noop ( ) { }
13
+ export function noop ( ) : void { }
Original file line number Diff line number Diff line change @@ -7,4 +7,4 @@ export function isSvelteStore<T extends object>(
7
7
return 'subscribe' in obj && typeof obj . subscribe === 'function'
8
8
}
9
9
10
- export function noop ( ) { }
10
+ export function noop ( ) : void { }
You can’t perform that action at this time.
0 commit comments