Skip to content

Commit a25f079

Browse files
committed
fix: add queryClient as optional prop for queryOptions()
1 parent 4f0b9aa commit a25f079

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/query-options.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ import { DefaultError, QueryKey } from '@tanstack/query-core';
22

33
import { MobxQueryConfig } from './mobx-query.types';
44

5+
type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
6+
57
interface QueryOptionsParams<
68
TData,
79
TError = DefaultError,
810
TQueryKey extends QueryKey = QueryKey,
9-
> extends Omit<MobxQueryConfig<TData, TError, TQueryKey>, 'queryClient'> {}
11+
> extends PartialKeys<
12+
MobxQueryConfig<TData, TError, TQueryKey>,
13+
'queryClient'
14+
> {}
1015

1116
export function queryOptions<
1217
TData,

0 commit comments

Comments
 (0)