Skip to content

Commit c15d00a

Browse files
committed
feat: add InfiniteQueryConfig type for improved query configuration
1 parent 9f2b4ef commit c15d00a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/lib/react-query.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persi
22
import {
33
DefaultOptions,
44
QueryClient,
5+
UseInfiniteQueryOptions,
56
UseMutationOptions,
67
UseQueryOptions,
78
} from '@tanstack/react-query'
@@ -36,6 +37,11 @@ export type QueryConfig<QueryFnType extends (...args: any) => any> = Omit<
3637
'queryKey' | 'queryFn'
3738
>
3839

40+
export type InfiniteQueryConfig<QueryFnType extends (...args: any) => any> = Omit<
41+
UseInfiniteQueryOptions<ExtractFnReturnType<QueryFnType>>,
42+
'queryKey' | 'queryFn' | 'getNextPageParam'
43+
>
44+
3945
export type MutationConfig<MutationFnType extends (...args: any) => any> = UseMutationOptions<
4046
ExtractFnReturnType<MutationFnType>,
4147
AxiosError,

0 commit comments

Comments
 (0)