File tree Expand file tree Collapse file tree 9 files changed +12
-10
lines changed
angular-query-experimental/src/util
query-async-storage-persister/src
query-sync-storage-persister/src Expand file tree Collapse file tree 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>(
1010 return ! ! throwError
1111}
1212
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<
8888 React . useCallback (
8989 ( onStoreChange ) => {
9090 const unsubscribe = isRestoring
91- ? ( ) => undefined
91+ ? noop
9292 : observer . subscribe ( notifyManager . batchCalls ( onStoreChange ) )
9393
9494 // 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 {
2020 shouldSuspend ,
2121 willFetch ,
2222} from './suspense'
23+ import { noop } from './utils'
2324import type {
2425 DefinedUseQueryResult ,
2526 UseQueryOptions ,
@@ -280,7 +281,7 @@ export function useQueries<
280281 React . useCallback (
281282 ( onStoreChange ) =>
282283 isRestoring
283- ? ( ) => undefined
284+ ? noop
284285 : observer . subscribe ( notifyManager . batchCalls ( onStoreChange ) ) ,
285286 [ observer , isRestoring ] ,
286287 ) ,
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ export function shouldThrowError<T extends (...args: Array<any>) => boolean>(
1010 return ! ! throwError
1111}
1212
13- export function noop ( ) { }
13+ export function noop ( ) : void { }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313} from 'solid-js'
1414import { useQueryClient } from './QueryClientProvider'
1515import { useIsRestoring } from './isRestoring'
16+ import { noop } from './utils'
1617import type { CreateQueryResult , SolidQueryOptions } from './types'
1718import type { Accessor } from 'solid-js'
1819import type { QueryClient } from './QueryClient'
@@ -305,10 +306,10 @@ export function createQueries<
305306 } )
306307 } )
307308
308- let unsubscribe : ( ) => void = ( ) => undefined
309+ let unsubscribe = noop
309310 createComputed < ( ) => void > ( ( cleanup ) => {
310311 cleanup ?.( )
311- unsubscribe = isRestoring ( ) ? ( ) => undefined : subscribeToObserver ( )
312+ unsubscribe = isRestoring ( ) ? noop : subscribeToObserver ( )
312313 // cleanup needs to be scheduled after synchronous effects take place
313314 return ( ) => queueMicrotask ( unsubscribe )
314315 } )
Original file line number Diff line number Diff line change @@ -10,4 +10,4 @@ export function shouldThrowError<T extends (...args: Array<any>) => boolean>(
1010 return ! ! throwError
1111}
1212
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>(
77 return 'subscribe' in obj && typeof obj . subscribe === 'function'
88}
99
10- export function noop ( ) { }
10+ export function noop ( ) : void { }
You can’t perform that action at this time.
0 commit comments