@tanstack/angular-query-experimental 5.83.0 → 5.83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/create-base-query.d.ts +8 -0
  2. package/dist/create-base-query.mjs +74 -0
  3. package/dist/create-base-query.mjs.map +1 -0
  4. package/dist/index.d.ts +26 -0
  5. package/dist/index.mjs +35 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/dist/infinite-query-options.d.ts +44 -0
  8. package/dist/infinite-query-options.mjs +7 -0
  9. package/dist/infinite-query-options.mjs.map +1 -0
  10. package/dist/inject-infinite-query.d.ts +39 -0
  11. package/dist/inject-infinite-query.mjs +18 -0
  12. package/dist/inject-infinite-query.mjs.map +1 -0
  13. package/dist/inject-is-fetching.d.ts +21 -0
  14. package/dist/inject-is-fetching.mjs +31 -0
  15. package/dist/inject-is-fetching.mjs.map +1 -0
  16. package/dist/inject-is-mutating.d.ts +20 -0
  17. package/dist/inject-is-mutating.mjs +31 -0
  18. package/dist/inject-is-mutating.mjs.map +1 -0
  19. package/dist/inject-is-restoring.d.ts +24 -0
  20. package/dist/inject-is-restoring.mjs +24 -0
  21. package/dist/inject-is-restoring.mjs.map +1 -0
  22. package/dist/inject-mutation-state.d.ts +26 -0
  23. package/dist/inject-mutation-state.mjs +51 -0
  24. package/dist/inject-mutation-state.mjs.map +1 -0
  25. package/dist/inject-mutation.d.ts +22 -0
  26. package/dist/inject-mutation.mjs +79 -0
  27. package/dist/inject-mutation.mjs.map +1 -0
  28. package/dist/inject-queries.d.ts +76 -0
  29. package/dist/inject-queries.mjs +49 -0
  30. package/dist/inject-queries.mjs.map +1 -0
  31. package/dist/inject-query-client.d.ts +19 -0
  32. package/dist/inject-query-client.mjs +9 -0
  33. package/dist/inject-query-client.mjs.map +1 -0
  34. package/dist/inject-query.d.ts +126 -0
  35. package/dist/inject-query.mjs +14 -0
  36. package/dist/inject-query.mjs.map +1 -0
  37. package/dist/mutation-options.d.ts +38 -0
  38. package/dist/mutation-options.mjs +7 -0
  39. package/dist/mutation-options.mjs.map +1 -0
  40. package/dist/providers.d.ts +215 -0
  41. package/dist/providers.mjs +109 -0
  42. package/dist/providers.mjs.map +1 -0
  43. package/dist/query-options.d.ts +87 -0
  44. package/dist/query-options.mjs +7 -0
  45. package/dist/query-options.mjs.map +1 -0
  46. package/dist/signal-proxy.d.ts +11 -0
  47. package/dist/signal-proxy.mjs +29 -0
  48. package/dist/signal-proxy.mjs.map +1 -0
  49. package/dist/types.d.ts +89 -0
  50. package/dist/util/is-dev-mode/is-dev-mode.d.ts +1 -0
  51. package/package.json +9 -10
  52. package/build/index.d.ts +0 -821
  53. package/build/index.mjs +0 -622
  54. package/build/index.mjs.map +0 -1
  55. package/src/test-setup.ts +0 -7
package/build/index.d.ts DELETED
@@ -1,821 +0,0 @@
1
- import { DefaultError, QueryKey, OmitKeyof, QueryObserverOptions, InfiniteQueryObserverOptions, DefinedInfiniteQueryObserverResult, QueryObserverResult, InfiniteQueryObserverResult, Override, MutationObserverResult, MutateFunction, DefinedQueryObserverResult, NonUndefinedGuard, QueryFunction, InitialDataFunction, SkipToken, DataTag, MutationObserverOptions, InfiniteData, QueryFilters, MutationFilters, MutationState, Mutation, QueriesPlaceholderDataFunction, ThrowOnError, QueryClient } from '@tanstack/query-core';
2
- export * from '@tanstack/query-core';
3
- import { Signal, Injector, Provider, InjectOptions, InjectionToken } from '@angular/core';
4
- import { DevtoolsButtonPosition, DevtoolsPosition, DevtoolsErrorType } from '@tanstack/query-devtools';
5
-
6
- type MapToSignals<T> = {
7
- [K in keyof T]: T[K] extends Function ? T[K] : Signal<T[K]>;
8
- };
9
-
10
- /**
11
- * @public
12
- */
13
- interface CreateBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
14
- }
15
- /**
16
- * @public
17
- */
18
- interface CreateQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<CreateBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'suspense'> {
19
- }
20
- /**
21
- * @public
22
- */
23
- type CreateStatusBasedQueryResult<TStatus extends QueryObserverResult['status'], TData = unknown, TError = DefaultError> = Extract<QueryObserverResult<TData, TError>, {
24
- status: TStatus;
25
- }>;
26
- /**
27
- * @public
28
- */
29
- interface BaseQueryNarrowing<TData = unknown, TError = DefaultError> {
30
- isSuccess: (this: CreateBaseQueryResult<TData, TError>) => this is CreateBaseQueryResult<TData, TError, CreateStatusBasedQueryResult<'success', TData, TError>>;
31
- isError: (this: CreateBaseQueryResult<TData, TError>) => this is CreateBaseQueryResult<TData, TError, CreateStatusBasedQueryResult<'error', TData, TError>>;
32
- isPending: (this: CreateBaseQueryResult<TData, TError>) => this is CreateBaseQueryResult<TData, TError, CreateStatusBasedQueryResult<'pending', TData, TError>>;
33
- }
34
- /**
35
- * @public
36
- */
37
- interface CreateInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
38
- }
39
- /**
40
- * @public
41
- */
42
- type CreateBaseQueryResult<TData = unknown, TError = DefaultError, TState = QueryObserverResult<TData, TError>> = BaseQueryNarrowing<TData, TError> & MapToSignals<OmitKeyof<TState, keyof BaseQueryNarrowing, 'safely'>>;
43
- /**
44
- * @public
45
- */
46
- type CreateQueryResult<TData = unknown, TError = DefaultError> = CreateBaseQueryResult<TData, TError>;
47
- /**
48
- * @public
49
- */
50
- type DefinedCreateQueryResult<TData = unknown, TError = DefaultError, TState = DefinedQueryObserverResult<TData, TError>> = BaseQueryNarrowing<TData, TError> & MapToSignals<OmitKeyof<TState, keyof BaseQueryNarrowing, 'safely'>>;
51
- /**
52
- * @public
53
- */
54
- type CreateInfiniteQueryResult<TData = unknown, TError = DefaultError> = BaseQueryNarrowing<TData, TError> & MapToSignals<InfiniteQueryObserverResult<TData, TError>>;
55
- /**
56
- * @public
57
- */
58
- type DefinedCreateInfiniteQueryResult<TData = unknown, TError = DefaultError, TDefinedInfiniteQueryObserver = DefinedInfiniteQueryObserverResult<TData, TError>> = MapToSignals<TDefinedInfiniteQueryObserver>;
59
- /**
60
- * @public
61
- */
62
- type CreateMutateFunction<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TContext>>) => void;
63
- /**
64
- * @public
65
- */
66
- type CreateMutateAsyncFunction<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown> = MutateFunction<TData, TError, TVariables, TContext>;
67
- /**
68
- * @public
69
- */
70
- type CreateBaseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TContext = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TContext>, {
71
- mutate: CreateMutateFunction<TData, TError, TVariables, TContext>;
72
- }> & {
73
- mutateAsync: CreateMutateAsyncFunction<TData, TError, TVariables, TContext>;
74
- };
75
- /**
76
- * @public
77
- */
78
- type CreateStatusBasedMutationResult<TStatus extends CreateBaseMutationResult['status'], TData = unknown, TError = DefaultError, TVariables = unknown, TContext = unknown> = Extract<CreateBaseMutationResult<TData, TError, TVariables, TContext>, {
79
- status: TStatus;
80
- }>;
81
- type SignalFunction<T extends () => any> = T & Signal<ReturnType<T>>;
82
- /**
83
- * @public
84
- */
85
- interface BaseMutationNarrowing<TData = unknown, TError = DefaultError, TVariables = unknown, TContext = unknown> {
86
- isSuccess: SignalFunction<(this: CreateMutationResult<TData, TError, TVariables, TContext>) => this is CreateMutationResult<TData, TError, TVariables, TContext, CreateStatusBasedMutationResult<'success', TData, TError, TVariables, TContext>>>;
87
- isError: SignalFunction<(this: CreateMutationResult<TData, TError, TVariables, TContext>) => this is CreateMutationResult<TData, TError, TVariables, TContext, CreateStatusBasedMutationResult<'error', TData, TError, TVariables, TContext>>>;
88
- isPending: SignalFunction<(this: CreateMutationResult<TData, TError, TVariables, TContext>) => this is CreateMutationResult<TData, TError, TVariables, TContext, CreateStatusBasedMutationResult<'pending', TData, TError, TVariables, TContext>>>;
89
- isIdle: SignalFunction<(this: CreateMutationResult<TData, TError, TVariables, TContext>) => this is CreateMutationResult<TData, TError, TVariables, TContext, CreateStatusBasedMutationResult<'idle', TData, TError, TVariables, TContext>>>;
90
- }
91
- /**
92
- * @public
93
- */
94
- type CreateMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TContext = unknown, TState = CreateStatusBasedMutationResult<CreateBaseMutationResult['status'], TData, TError, TVariables, TContext>> = BaseMutationNarrowing<TData, TError, TVariables, TContext> & MapToSignals<OmitKeyof<TState, keyof BaseMutationNarrowing, 'safely'>>;
95
-
96
- type UndefinedInitialDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey> & {
97
- initialData?: undefined | InitialDataFunction<NonUndefinedGuard<TQueryFnData>> | NonUndefinedGuard<TQueryFnData>;
98
- };
99
- type UnusedSkipTokenOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {
100
- queryFn?: Exclude<CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken | undefined>;
101
- };
102
- type DefinedInitialDataOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = Omit<CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn'> & {
103
- initialData: NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>);
104
- queryFn?: QueryFunction<TQueryFnData, TQueryKey>;
105
- };
106
- /**
107
- * Allows to share and re-use query options in a type-safe way.
108
- *
109
- * The `queryKey` will be tagged with the type from `queryFn`.
110
- *
111
- * **Example**
112
- *
113
- * ```ts
114
- * const { queryKey } = queryOptions({
115
- * queryKey: ['key'],
116
- * queryFn: () => Promise.resolve(5),
117
- * // ^? Promise<number>
118
- * })
119
- *
120
- * const queryClient = new QueryClient()
121
- * const data = queryClient.getQueryData(queryKey)
122
- * // ^? number | undefined
123
- * ```
124
- * @param options - The query options to tag with the type from `queryFn`.
125
- * @returns The tagged query options.
126
- * @public
127
- */
128
- declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>): DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {
129
- queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
130
- };
131
- /**
132
- * Allows to share and re-use query options in a type-safe way.
133
- *
134
- * The `queryKey` will be tagged with the type from `queryFn`.
135
- *
136
- * **Example**
137
- *
138
- * ```ts
139
- * const { queryKey } = queryOptions({
140
- * queryKey: ['key'],
141
- * queryFn: () => Promise.resolve(5),
142
- * // ^? Promise<number>
143
- * })
144
- *
145
- * const queryClient = new QueryClient()
146
- * const data = queryClient.getQueryData(queryKey)
147
- * // ^? number | undefined
148
- * ```
149
- * @param options - The query options to tag with the type from `queryFn`.
150
- * @returns The tagged query options.
151
- * @public
152
- */
153
- declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey>): UnusedSkipTokenOptions<TQueryFnData, TError, TData, TQueryKey> & {
154
- queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
155
- };
156
- /**
157
- * Allows to share and re-use query options in a type-safe way.
158
- *
159
- * The `queryKey` will be tagged with the type from `queryFn`.
160
- *
161
- * **Example**
162
- *
163
- * ```ts
164
- * const { queryKey } = queryOptions({
165
- * queryKey: ['key'],
166
- * queryFn: () => Promise.resolve(5),
167
- * // ^? Promise<number>
168
- * })
169
- *
170
- * const queryClient = new QueryClient()
171
- * const data = queryClient.getQueryData(queryKey)
172
- * // ^? number | undefined
173
- * ```
174
- * @param options - The query options to tag with the type from `queryFn`.
175
- * @returns The tagged query options.
176
- * @public
177
- */
178
- declare function queryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>): UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey> & {
179
- queryKey: DataTag<TQueryKey, TQueryFnData, TError>;
180
- };
181
-
182
- /**
183
- * Allows to share and re-use mutation options in a type-safe way.
184
- *
185
- * **Example**
186
- *
187
- * ```ts
188
- * export class QueriesService {
189
- * private http = inject(HttpClient);
190
- *
191
- * updatePost(id: number) {
192
- * return mutationOptions({
193
- * mutationFn: (post: Post) => Promise.resolve(post),
194
- * mutationKey: ["updatePost", id],
195
- * onSuccess: (newPost) => {
196
- * // ^? newPost: Post
197
- * this.queryClient.setQueryData(["posts", id], newPost);
198
- * },
199
- * });
200
- * }
201
- * }
202
- *
203
- * queries = inject(QueriesService)
204
- * idSignal = new Signal(0);
205
- * mutation = injectMutation(() => this.queries.updatePost(this.idSignal()))
206
- *
207
- * mutation.mutate({ title: 'New Title' })
208
- * ```
209
- * @param options - The mutation options.
210
- * @returns Mutation options.
211
- * @public
212
- */
213
- declare function mutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(options: MutationObserverOptions<TData, TError, TVariables, TContext>): CreateMutationOptions<TData, TError, TVariables, TContext>;
214
- /**
215
- * @public
216
- */
217
- interface CreateMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown> extends OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TContext>, '_defaulted'> {
218
- }
219
-
220
- type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
221
- initialData?: undefined | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | InitialDataFunction<NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>>;
222
- };
223
- type UnusedSkipTokenInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = OmitKeyof<CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn'> & {
224
- queryFn?: Exclude<CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken | undefined>;
225
- };
226
- type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
227
- initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>) | undefined;
228
- };
229
- /**
230
- * Allows to share and re-use infinite query options in a type-safe way.
231
- *
232
- * The `queryKey` will be tagged with the type from `queryFn`.
233
- * @param options - The infinite query options to tag with the type from `queryFn`.
234
- * @returns The tagged infinite query options.
235
- * @public
236
- */
237
- declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
238
- queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
239
- };
240
- /**
241
- * Allows to share and re-use infinite query options in a type-safe way.
242
- *
243
- * The `queryKey` will be tagged with the type from `queryFn`.
244
- * @param options - The infinite query options to tag with the type from `queryFn`.
245
- * @returns The tagged infinite query options.
246
- * @public
247
- */
248
- declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
249
- queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
250
- };
251
- /**
252
- * Allows to share and re-use infinite query options in a type-safe way.
253
- *
254
- * The `queryKey` will be tagged with the type from `queryFn`.
255
- * @param options - The infinite query options to tag with the type from `queryFn`.
256
- * @returns The tagged infinite query options.
257
- * @public
258
- */
259
- declare function infiniteQueryOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & {
260
- queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
261
- };
262
-
263
- interface InjectInfiniteQueryOptions {
264
- /**
265
- * The `Injector` in which to create the infinite query.
266
- *
267
- * If this is not provided, the current injection context will be used instead (via `inject`).
268
- */
269
- injector?: Injector;
270
- }
271
- /**
272
- * Injects an infinite query: a declarative dependency on an asynchronous source of data that is tied to a unique key.
273
- * Infinite queries can additively "load more" data onto an existing set of data or "infinite scroll"
274
- * @param injectInfiniteQueryFn - A function that returns infinite query options.
275
- * @param options - Additional configuration.
276
- * @returns The infinite query result.
277
- * @public
278
- */
279
- declare function injectInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(injectInfiniteQueryFn: () => DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, options?: InjectInfiniteQueryOptions): DefinedCreateInfiniteQueryResult<TData, TError>;
280
- /**
281
- * Injects an infinite query: a declarative dependency on an asynchronous source of data that is tied to a unique key.
282
- * Infinite queries can additively "load more" data onto an existing set of data or "infinite scroll"
283
- * @param injectInfiniteQueryFn - A function that returns infinite query options.
284
- * @param options - Additional configuration.
285
- * @returns The infinite query result.
286
- * @public
287
- */
288
- declare function injectInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(injectInfiniteQueryFn: () => UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, options?: InjectInfiniteQueryOptions): CreateInfiniteQueryResult<TData, TError>;
289
- /**
290
- * Injects an infinite query: a declarative dependency on an asynchronous source of data that is tied to a unique key.
291
- * Infinite queries can additively "load more" data onto an existing set of data or "infinite scroll"
292
- * @param injectInfiniteQueryFn - A function that returns infinite query options.
293
- * @param options - Additional configuration.
294
- * @returns The infinite query result.
295
- * @public
296
- */
297
- declare function injectInfiniteQuery<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown>(injectInfiniteQueryFn: () => CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, options?: InjectInfiniteQueryOptions): CreateInfiniteQueryResult<TData, TError>;
298
-
299
- interface InjectIsFetchingOptions {
300
- /**
301
- * The `Injector` in which to create the isFetching signal.
302
- *
303
- * If this is not provided, the current injection context will be used instead (via `inject`).
304
- */
305
- injector?: Injector;
306
- }
307
- /**
308
- * Injects a signal that tracks the number of queries that your application is loading or
309
- * fetching in the background.
310
- *
311
- * Can be used for app-wide loading indicators
312
- * @param filters - The filters to apply to the query.
313
- * @param options - Additional configuration
314
- * @returns signal with number of loading or fetching queries.
315
- * @public
316
- */
317
- declare function injectIsFetching(filters?: QueryFilters, options?: InjectIsFetchingOptions): Signal<number>;
318
-
319
- interface InjectIsMutatingOptions {
320
- /**
321
- * The `Injector` in which to create the isMutating signal.
322
- *
323
- * If this is not provided, the current injection context will be used instead (via `inject`).
324
- */
325
- injector?: Injector;
326
- }
327
- /**
328
- * Injects a signal that tracks the number of mutations that your application is fetching.
329
- *
330
- * Can be used for app-wide loading indicators
331
- * @param filters - The filters to apply to the query.
332
- * @param options - Additional configuration
333
- * @returns signal with number of fetching mutations.
334
- * @public
335
- */
336
- declare function injectIsMutating(filters?: MutationFilters, options?: InjectIsMutatingOptions): Signal<number>;
337
-
338
- /**
339
- * The `Injector` in which to create the isRestoring signal.
340
- *
341
- * If this is not provided, the current injection context will be used instead (via `inject`).
342
- */
343
- interface InjectIsRestoringOptions {
344
- injector?: Injector;
345
- }
346
- /**
347
- * Injects a signal that tracks whether a restore is currently in progress. {@link injectQuery} and friends also check this internally to avoid race conditions between the restore and initializing queries.
348
- * @param options - Options for injectIsRestoring.
349
- * @returns signal with boolean that indicates whether a restore is in progress.
350
- * @public
351
- */
352
- declare function injectIsRestoring(options?: InjectIsRestoringOptions): Signal<boolean>;
353
- /**
354
- * Used by TanStack Query Angular persist client plugin to provide the signal that tracks the restore state
355
- * @param isRestoring - a readonly signal that returns a boolean
356
- * @returns Provider for the `isRestoring` signal
357
- * @public
358
- */
359
- declare function provideIsRestoring(isRestoring: Signal<boolean>): Provider;
360
-
361
- interface InjectMutationOptions {
362
- /**
363
- * The `Injector` in which to create the mutation.
364
- *
365
- * If this is not provided, the current injection context will be used instead (via `inject`).
366
- */
367
- injector?: Injector;
368
- }
369
- /**
370
- * Injects a mutation: an imperative function that can be invoked which typically performs server side effects.
371
- *
372
- * Unlike queries, mutations are not run automatically.
373
- * @param injectMutationFn - A function that returns mutation options.
374
- * @param options - Additional configuration
375
- * @returns The mutation.
376
- * @public
377
- */
378
- declare function injectMutation<TData = unknown, TError = DefaultError, TVariables = void, TContext = unknown>(injectMutationFn: () => CreateMutationOptions<TData, TError, TVariables, TContext>, options?: InjectMutationOptions): CreateMutationResult<TData, TError, TVariables, TContext>;
379
-
380
- type MutationStateOptions<TResult = MutationState> = {
381
- filters?: MutationFilters;
382
- select?: (mutation: Mutation) => TResult;
383
- };
384
- /**
385
- * @public
386
- */
387
- interface InjectMutationStateOptions {
388
- /**
389
- * The `Injector` in which to create the mutation state signal.
390
- *
391
- * If this is not provided, the current injection context will be used instead (via `inject`).
392
- */
393
- injector?: Injector;
394
- }
395
- /**
396
- * Injects a signal that tracks the state of all mutations.
397
- * @param injectMutationStateFn - A function that returns mutation state options.
398
- * @param options - The Angular injector to use.
399
- * @returns The signal that tracks the state of all mutations.
400
- * @public
401
- */
402
- declare function injectMutationState<TResult = MutationState>(injectMutationStateFn?: () => MutationStateOptions<TResult>, options?: InjectMutationStateOptions): Signal<Array<TResult>>;
403
-
404
- type QueryObserverOptionsForCreateQueries<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = OmitKeyof<QueryObserverOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'placeholderData'> & {
405
- placeholderData?: TQueryFnData | QueriesPlaceholderDataFunction<TQueryFnData>;
406
- };
407
- type MAXIMUM_DEPTH = 20;
408
- type SkipTokenForUseQueries = symbol;
409
- type GetOptions<T> = T extends {
410
- queryFnData: infer TQueryFnData;
411
- error?: infer TError;
412
- data: infer TData;
413
- } ? QueryObserverOptionsForCreateQueries<TQueryFnData, TError, TData> : T extends {
414
- queryFnData: infer TQueryFnData;
415
- error?: infer TError;
416
- } ? QueryObserverOptionsForCreateQueries<TQueryFnData, TError> : T extends {
417
- data: infer TData;
418
- error?: infer TError;
419
- } ? QueryObserverOptionsForCreateQueries<unknown, TError, TData> : T extends [infer TQueryFnData, infer TError, infer TData] ? QueryObserverOptionsForCreateQueries<TQueryFnData, TError, TData> : T extends [infer TQueryFnData, infer TError] ? QueryObserverOptionsForCreateQueries<TQueryFnData, TError> : T extends [infer TQueryFnData] ? QueryObserverOptionsForCreateQueries<TQueryFnData> : T extends {
420
- queryFn?: QueryFunction<infer TQueryFnData, infer TQueryKey> | SkipTokenForUseQueries;
421
- select: (data: any) => infer TData;
422
- throwOnError?: ThrowOnError<any, infer TError, any, any>;
423
- } ? QueryObserverOptionsForCreateQueries<TQueryFnData, unknown extends TError ? DefaultError : TError, unknown extends TData ? TQueryFnData : TData, TQueryKey> : QueryObserverOptionsForCreateQueries;
424
- type GetResults<T> = T extends {
425
- queryFnData: any;
426
- error?: infer TError;
427
- data: infer TData;
428
- } ? QueryObserverResult<TData, TError> : T extends {
429
- queryFnData: infer TQueryFnData;
430
- error?: infer TError;
431
- } ? QueryObserverResult<TQueryFnData, TError> : T extends {
432
- data: infer TData;
433
- error?: infer TError;
434
- } ? QueryObserverResult<TData, TError> : T extends [any, infer TError, infer TData] ? QueryObserverResult<TData, TError> : T extends [infer TQueryFnData, infer TError] ? QueryObserverResult<TQueryFnData, TError> : T extends [infer TQueryFnData] ? QueryObserverResult<TQueryFnData> : T extends {
435
- queryFn?: QueryFunction<infer TQueryFnData, any> | SkipTokenForUseQueries;
436
- select: (data: any) => infer TData;
437
- throwOnError?: ThrowOnError<any, infer TError, any, any>;
438
- } ? QueryObserverResult<unknown extends TData ? TQueryFnData : TData, unknown extends TError ? DefaultError : TError> : QueryObserverResult;
439
- /**
440
- * QueriesOptions reducer recursively unwraps function arguments to infer/enforce type param
441
- * @public
442
- */
443
- type QueriesOptions<T extends Array<any>, TResult extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array<QueryObserverOptionsForCreateQueries> : T extends [] ? [] : T extends [infer Head] ? [...TResult, GetOptions<Head>] : T extends [infer Head, ...infer Tail] ? QueriesOptions<[
444
- ...Tail
445
- ], [
446
- ...TResult,
447
- GetOptions<Head>
448
- ], [
449
- ...TDepth,
450
- 1
451
- ]> : ReadonlyArray<unknown> extends T ? T : T extends Array<QueryObserverOptionsForCreateQueries<infer TQueryFnData, infer TError, infer TData, infer TQueryKey>> ? Array<QueryObserverOptionsForCreateQueries<TQueryFnData, TError, TData, TQueryKey>> : Array<QueryObserverOptionsForCreateQueries>;
452
- /**
453
- * QueriesResults reducer recursively maps type param to results
454
- * @public
455
- */
456
- type QueriesResults<T extends Array<any>, TResult extends Array<any> = [], TDepth extends ReadonlyArray<number> = []> = TDepth['length'] extends MAXIMUM_DEPTH ? Array<QueryObserverResult> : T extends [] ? [] : T extends [infer Head] ? [...TResult, GetResults<Head>] : T extends [infer Head, ...infer Tail] ? QueriesResults<[
457
- ...Tail
458
- ], [
459
- ...TResult,
460
- GetResults<Head>
461
- ], [
462
- ...TDepth,
463
- 1
464
- ]> : T extends Array<QueryObserverOptionsForCreateQueries<infer TQueryFnData, infer TError, infer TData, any>> ? Array<QueryObserverResult<unknown extends TData ? TQueryFnData : TData, unknown extends TError ? DefaultError : TError>> : Array<QueryObserverResult>;
465
- /**
466
- * @param root0
467
- * @param root0.queries
468
- * @param root0.combine
469
- * @param injector
470
- * @param injector
471
- * @public
472
- */
473
- declare function injectQueries<T extends Array<any>, TCombinedResult = QueriesResults<T>>({ queries, ...options }: {
474
- queries: Signal<[...QueriesOptions<T>]>;
475
- combine?: (result: QueriesResults<T>) => TCombinedResult;
476
- }, injector?: Injector): Signal<TCombinedResult>;
477
-
478
- interface InjectQueryOptions {
479
- /**
480
- * The `Injector` in which to create the query.
481
- *
482
- * If this is not provided, the current injection context will be used instead (via `inject`).
483
- */
484
- injector?: Injector;
485
- }
486
- /**
487
- * Injects a query: a declarative dependency on an asynchronous source of data that is tied to a unique key.
488
- *
489
- * **Basic example**
490
- * ```ts
491
- * class ServiceOrComponent {
492
- * query = injectQuery(() => ({
493
- * queryKey: ['repoData'],
494
- * queryFn: () =>
495
- * this.#http.get<Response>('https://api.github.com/repos/tanstack/query'),
496
- * }))
497
- * }
498
- * ```
499
- *
500
- * Similar to `computed` from Angular, the function passed to `injectQuery` will be run in the reactive context.
501
- * In the example below, the query will be automatically enabled and executed when the filter signal changes
502
- * to a truthy value. When the filter signal changes back to a falsy value, the query will be disabled.
503
- *
504
- * **Reactive example**
505
- * ```ts
506
- * class ServiceOrComponent {
507
- * filter = signal('')
508
- *
509
- * todosQuery = injectQuery(() => ({
510
- * queryKey: ['todos', this.filter()],
511
- * queryFn: () => fetchTodos(this.filter()),
512
- * // Signals can be combined with expressions
513
- * enabled: !!this.filter(),
514
- * }))
515
- * }
516
- * ```
517
- * @param injectQueryFn - A function that returns query options.
518
- * @param options - Additional configuration
519
- * @returns The query result.
520
- * @public
521
- * @see https://tanstack.com/query/latest/docs/framework/angular/guides/queries
522
- */
523
- declare function injectQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(injectQueryFn: () => DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, options?: InjectQueryOptions): DefinedCreateQueryResult<TData, TError>;
524
- /**
525
- * Injects a query: a declarative dependency on an asynchronous source of data that is tied to a unique key.
526
- *
527
- * **Basic example**
528
- * ```ts
529
- * class ServiceOrComponent {
530
- * query = injectQuery(() => ({
531
- * queryKey: ['repoData'],
532
- * queryFn: () =>
533
- * this.#http.get<Response>('https://api.github.com/repos/tanstack/query'),
534
- * }))
535
- * }
536
- * ```
537
- *
538
- * Similar to `computed` from Angular, the function passed to `injectQuery` will be run in the reactive context.
539
- * In the example below, the query will be automatically enabled and executed when the filter signal changes
540
- * to a truthy value. When the filter signal changes back to a falsy value, the query will be disabled.
541
- *
542
- * **Reactive example**
543
- * ```ts
544
- * class ServiceOrComponent {
545
- * filter = signal('')
546
- *
547
- * todosQuery = injectQuery(() => ({
548
- * queryKey: ['todos', this.filter()],
549
- * queryFn: () => fetchTodos(this.filter()),
550
- * // Signals can be combined with expressions
551
- * enabled: !!this.filter(),
552
- * }))
553
- * }
554
- * ```
555
- * @param injectQueryFn - A function that returns query options.
556
- * @param options - Additional configuration
557
- * @returns The query result.
558
- * @public
559
- * @see https://tanstack.com/query/latest/docs/framework/angular/guides/queries
560
- */
561
- declare function injectQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(injectQueryFn: () => UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, options?: InjectQueryOptions): CreateQueryResult<TData, TError>;
562
- /**
563
- * Injects a query: a declarative dependency on an asynchronous source of data that is tied to a unique key.
564
- *
565
- * **Basic example**
566
- * ```ts
567
- * class ServiceOrComponent {
568
- * query = injectQuery(() => ({
569
- * queryKey: ['repoData'],
570
- * queryFn: () =>
571
- * this.#http.get<Response>('https://api.github.com/repos/tanstack/query'),
572
- * }))
573
- * }
574
- * ```
575
- *
576
- * Similar to `computed` from Angular, the function passed to `injectQuery` will be run in the reactive context.
577
- * In the example below, the query will be automatically enabled and executed when the filter signal changes
578
- * to a truthy value. When the filter signal changes back to a falsy value, the query will be disabled.
579
- *
580
- * **Reactive example**
581
- * ```ts
582
- * class ServiceOrComponent {
583
- * filter = signal('')
584
- *
585
- * todosQuery = injectQuery(() => ({
586
- * queryKey: ['todos', this.filter()],
587
- * queryFn: () => fetchTodos(this.filter()),
588
- * // Signals can be combined with expressions
589
- * enabled: !!this.filter(),
590
- * }))
591
- * }
592
- * ```
593
- * @param injectQueryFn - A function that returns query options.
594
- * @param options - Additional configuration
595
- * @returns The query result.
596
- * @public
597
- * @see https://tanstack.com/query/latest/docs/framework/angular/guides/queries
598
- */
599
- declare function injectQuery<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(injectQueryFn: () => CreateQueryOptions<TQueryFnData, TError, TData, TQueryKey>, options?: InjectQueryOptions): CreateQueryResult<TData, TError>;
600
-
601
- /**
602
- * Injects a `QueryClient` instance and allows passing a custom injector.
603
- * @param injectOptions - Type of the options argument to inject and optionally a custom injector.
604
- * @returns The `QueryClient` instance.
605
- * @public
606
- * @deprecated Use `inject(QueryClient)` instead.
607
- * If you need to get a `QueryClient` from a custom injector, use `injector.get(QueryClient)`.
608
- *
609
- *
610
- * **Example**
611
- * ```ts
612
- * const queryClient = injectQueryClient();
613
- * ```
614
- */
615
- declare function injectQueryClient(injectOptions?: InjectOptions & {
616
- injector?: Injector;
617
- }): QueryClient;
618
-
619
- /**
620
- * Usually {@link provideTanStackQuery} is used once to set up TanStack Query and the
621
- * {@link https://tanstack.com/query/latest/docs/reference/QueryClient|QueryClient}
622
- * for the entire application. Internally it calls `provideQueryClient`.
623
- * You can use `provideQueryClient` to provide a different `QueryClient` instance for a part
624
- * of the application or for unit testing purposes.
625
- * @param queryClient - A `QueryClient` instance, or an `InjectionToken` which provides a `QueryClient`.
626
- * @returns a provider object that can be used to provide the `QueryClient` instance.
627
- */
628
- declare function provideQueryClient(queryClient: QueryClient | InjectionToken<QueryClient>): Provider;
629
- /**
630
- * Sets up providers necessary to enable TanStack Query functionality for Angular applications.
631
- *
632
- * Allows to configure a `QueryClient` and optional features such as developer tools.
633
- *
634
- * **Example - standalone**
635
- *
636
- * ```ts
637
- * import {
638
- * provideTanStackQuery,
639
- * QueryClient,
640
- * } from '@tanstack/angular-query-experimental'
641
- *
642
- * bootstrapApplication(AppComponent, {
643
- * providers: [provideTanStackQuery(new QueryClient())],
644
- * })
645
- * ```
646
- *
647
- * **Example - NgModule-based**
648
- *
649
- * ```ts
650
- * import {
651
- * provideTanStackQuery,
652
- * QueryClient,
653
- * } from '@tanstack/angular-query-experimental'
654
- *
655
- * @NgModule({
656
- * declarations: [AppComponent],
657
- * imports: [BrowserModule],
658
- * providers: [provideTanStackQuery(new QueryClient())],
659
- * bootstrap: [AppComponent],
660
- * })
661
- * export class AppModule {}
662
- * ```
663
- *
664
- * You can also enable optional developer tools by adding `withDevtools`. By
665
- * default the tools will then be loaded when your app is in development mode.
666
- * ```ts
667
- * import {
668
- * provideTanStackQuery,
669
- * withDevtools
670
- * QueryClient,
671
- * } from '@tanstack/angular-query-experimental'
672
- *
673
- * bootstrapApplication(AppComponent,
674
- * {
675
- * providers: [
676
- * provideTanStackQuery(new QueryClient(), withDevtools())
677
- * ]
678
- * }
679
- * )
680
- * ```
681
- *
682
- * **Example: using an InjectionToken**
683
- *
684
- * ```ts
685
- * export const MY_QUERY_CLIENT = new InjectionToken('', {
686
- * factory: () => new QueryClient(),
687
- * })
688
- *
689
- * // In a lazy loaded route or lazy loaded component's providers array:
690
- * providers: [provideTanStackQuery(MY_QUERY_CLIENT)]
691
- * ```
692
- * @param queryClient - A `QueryClient` instance, or an `InjectionToken` which provides a `QueryClient`.
693
- * @param features - Optional features to configure additional Query functionality.
694
- * @returns A set of providers to set up TanStack Query.
695
- * @see https://tanstack.com/query/v5/docs/framework/angular/quick-start
696
- * @see withDevtools
697
- */
698
- declare function provideTanStackQuery(queryClient: QueryClient | InjectionToken<QueryClient>, ...features: Array<QueryFeatures>): Array<Provider>;
699
- /**
700
- * Helper type to represent a Query feature.
701
- */
702
- interface QueryFeature<TFeatureKind extends QueryFeatureKind> {
703
- ɵkind: TFeatureKind;
704
- ɵproviders: Array<Provider>;
705
- }
706
- /**
707
- * Helper function to create an object that represents a Query feature.
708
- * @param kind -
709
- * @param providers -
710
- * @returns A Query feature.
711
- */
712
- declare function queryFeature<TFeatureKind extends QueryFeatureKind>(kind: TFeatureKind, providers: Array<Provider>): QueryFeature<TFeatureKind>;
713
- /**
714
- * A type alias that represents a feature which enables developer tools.
715
- * The type is used to describe the return value of the `withDevtools` function.
716
- * @public
717
- * @see {@link withDevtools}
718
- */
719
- type DeveloperToolsFeature = QueryFeature<'DeveloperTools'>;
720
- /**
721
- * A type alias that represents a feature which enables persistence.
722
- * The type is used to describe the return value of the `withPersistQueryClient` function.
723
- * @public
724
- */
725
- type PersistQueryClientFeature = QueryFeature<'PersistQueryClient'>;
726
- /**
727
- * Options for configuring the TanStack Query devtools.
728
- * @public
729
- */
730
- interface DevtoolsOptions {
731
- /**
732
- * Set this true if you want the devtools to default to being open
733
- */
734
- initialIsOpen?: boolean;
735
- /**
736
- * The position of the TanStack logo to open and close the devtools panel.
737
- * `top-left` | `top-right` | `bottom-left` | `bottom-right` | `relative`
738
- * Defaults to `bottom-right`.
739
- */
740
- buttonPosition?: DevtoolsButtonPosition;
741
- /**
742
- * The position of the TanStack Query devtools panel.
743
- * `top` | `bottom` | `left` | `right`
744
- * Defaults to `bottom`.
745
- */
746
- position?: DevtoolsPosition;
747
- /**
748
- * Custom instance of QueryClient
749
- */
750
- client?: QueryClient;
751
- /**
752
- * Use this so you can define custom errors that can be shown in the devtools.
753
- */
754
- errorTypes?: Array<DevtoolsErrorType>;
755
- /**
756
- * Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
757
- */
758
- styleNonce?: string;
759
- /**
760
- * Use this so you can attach the devtool's styles to a specific element in the DOM.
761
- */
762
- shadowDOMTarget?: ShadowRoot;
763
- /**
764
- * Whether the developer tools should load.
765
- * - `auto`- (Default) Lazily loads devtools when in development mode. Skips loading in production mode.
766
- * - `true`- Always load the devtools, regardless of the environment.
767
- * - `false`- Never load the devtools, regardless of the environment.
768
- *
769
- * You can use `true` and `false` to override loading developer tools from an environment file.
770
- * For example, a test environment might run in production mode but you may want to load developer tools.
771
- *
772
- * Additionally, you can use a signal in the callback to dynamically load the devtools based on a condition. For example,
773
- * a signal created from a RxJS observable that listens for a keyboard shortcut.
774
- *
775
- * **Example**
776
- * ```ts
777
- * withDevtools(() => ({
778
- * initialIsOpen: true,
779
- * loadDevtools: inject(ExampleService).loadDevtools()
780
- * }))
781
- * ```
782
- */
783
- loadDevtools?: 'auto' | boolean;
784
- }
785
- /**
786
- * Enables developer tools.
787
- *
788
- * **Example**
789
- *
790
- * ```ts
791
- * export const appConfig: ApplicationConfig = {
792
- * providers: [
793
- * provideTanStackQuery(new QueryClient(), withDevtools())
794
- * ]
795
- * }
796
- * ```
797
- * By default the devtools will be loaded when Angular runs in development mode and rendered in `<body>`.
798
- *
799
- * If you need more control over when devtools are loaded, you can use the `loadDevtools` option. This is particularly useful if you want to load devtools based on environment configurations. For instance, you might have a test environment running in production mode but still require devtools to be available.
800
- *
801
- * If you need more control over where devtools are rendered, consider `injectDevtoolsPanel`. This allows rendering devtools inside your own devtools for example.
802
- * @param withDevtoolsFn - A function that returns `DevtoolsOptions`.
803
- * @returns A set of providers for use with `provideTanStackQuery`.
804
- * @public
805
- * @see {@link provideTanStackQuery}
806
- * @see {@link DevtoolsOptions}
807
- */
808
- declare function withDevtools(withDevtoolsFn?: () => DevtoolsOptions): DeveloperToolsFeature;
809
- /**
810
- * A type alias that represents all Query features available for use with `provideTanStackQuery`.
811
- * Features can be enabled by adding special functions to the `provideTanStackQuery` call.
812
- * See documentation for each symbol to find corresponding function name. See also `provideTanStackQuery`
813
- * documentation on how to use those functions.
814
- * @public
815
- * @see {@link provideTanStackQuery}
816
- */
817
- type QueryFeatures = DeveloperToolsFeature | PersistQueryClientFeature;
818
- declare const queryFeatures: readonly ["DeveloperTools", "PersistQueryClient"];
819
- type QueryFeatureKind = (typeof queryFeatures)[number];
820
-
821
- export { type BaseMutationNarrowing, type BaseQueryNarrowing, type CreateBaseMutationResult, type CreateBaseQueryOptions, type CreateBaseQueryResult, type CreateInfiniteQueryOptions, type CreateInfiniteQueryResult, type CreateMutateAsyncFunction, type CreateMutateFunction, type CreateMutationOptions, type CreateMutationResult, type CreateQueryOptions, type CreateQueryResult, type DefinedCreateInfiniteQueryResult, type DefinedCreateQueryResult, type DefinedInitialDataInfiniteOptions, type DefinedInitialDataOptions, type DeveloperToolsFeature, type DevtoolsOptions, type InjectInfiniteQueryOptions, type InjectIsFetchingOptions, type InjectIsMutatingOptions, type InjectMutationOptions, type InjectMutationStateOptions, type InjectQueryOptions, type PersistQueryClientFeature, type QueriesOptions, type QueriesResults, type QueryFeature, type QueryFeatureKind, type QueryFeatures, type UndefinedInitialDataInfiniteOptions, type UndefinedInitialDataOptions, type UnusedSkipTokenInfiniteOptions, type UnusedSkipTokenOptions, infiniteQueryOptions, injectInfiniteQuery, injectIsFetching, injectIsMutating, injectIsRestoring, injectMutation, injectMutationState, injectQueries, injectQuery, injectQueryClient, mutationOptions, provideIsRestoring, provideQueryClient, provideTanStackQuery, queryFeature, queryFeatures, queryOptions, withDevtools };