@tanstack/vue-query 5.40.1 → 5.41.0
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.
- package/build/legacy/index.cjs +3 -0
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.d.cts +1 -0
- package/build/legacy/index.d.ts +1 -0
- package/build/legacy/index.js +2 -0
- package/build/legacy/index.js.map +1 -1
- package/build/legacy/infiniteQueryOptions.cjs +33 -0
- package/build/legacy/infiniteQueryOptions.cjs.map +1 -0
- package/build/legacy/infiniteQueryOptions.d.cts +21 -0
- package/build/legacy/infiniteQueryOptions.d.ts +21 -0
- package/build/legacy/infiniteQueryOptions.js +8 -0
- package/build/legacy/infiniteQueryOptions.js.map +1 -0
- package/build/modern/index.cjs +3 -0
- package/build/modern/index.cjs.map +1 -1
- package/build/modern/index.d.cts +1 -0
- package/build/modern/index.d.ts +1 -0
- package/build/modern/index.js +2 -0
- package/build/modern/index.js.map +1 -1
- package/build/modern/infiniteQueryOptions.cjs +33 -0
- package/build/modern/infiniteQueryOptions.cjs.map +1 -0
- package/build/modern/infiniteQueryOptions.d.cts +21 -0
- package/build/modern/infiniteQueryOptions.d.ts +21 -0
- package/build/modern/infiniteQueryOptions.js +8 -0
- package/build/modern/infiniteQueryOptions.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/infiniteQueryOptions.test-d.ts +111 -0
- package/src/__tests__/queryClient.test.ts +17 -0
- package/src/__tests__/useInfiniteQuery.test.ts +32 -0
- package/src/index.ts +5 -0
- package/src/infiniteQueryOptions.ts +94 -0
package/build/legacy/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(src_exports, {
|
|
|
26
26
|
QueryClient: () => import_queryClient.QueryClient,
|
|
27
27
|
VUE_QUERY_CLIENT: () => import_utils.VUE_QUERY_CLIENT,
|
|
28
28
|
VueQueryPlugin: () => import_vueQueryPlugin.VueQueryPlugin,
|
|
29
|
+
infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
|
|
29
30
|
queryOptions: () => import_queryOptions.queryOptions,
|
|
30
31
|
useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
|
|
31
32
|
useIsFetching: () => import_useIsFetching.useIsFetching,
|
|
@@ -43,6 +44,7 @@ var import_vueQueryPlugin = require("./vueQueryPlugin.cjs");
|
|
|
43
44
|
var import_queryClient = require("./queryClient.cjs");
|
|
44
45
|
var import_queryCache = require("./queryCache.cjs");
|
|
45
46
|
var import_queryOptions = require("./queryOptions.cjs");
|
|
47
|
+
var import_infiniteQueryOptions = require("./infiniteQueryOptions.cjs");
|
|
46
48
|
var import_mutationCache = require("./mutationCache.cjs");
|
|
47
49
|
var import_useQuery = require("./useQuery.cjs");
|
|
48
50
|
var import_useQueries = require("./useQueries.cjs");
|
|
@@ -58,6 +60,7 @@ var import_utils = require("./utils.cjs");
|
|
|
58
60
|
QueryClient,
|
|
59
61
|
VUE_QUERY_CLIENT,
|
|
60
62
|
VueQueryPlugin,
|
|
63
|
+
infiniteQueryOptions,
|
|
61
64
|
queryOptions,
|
|
62
65
|
useInfiniteQuery,
|
|
63
66
|
useIsFetching,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,0BAA6B;AAC7B,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { infiniteQueryOptions } from './infiniteQueryOptions'\nexport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,0BAA6B;AAC7B,kCAAqC;AAKrC,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
package/build/legacy/index.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.cjs';
|
|
|
4
4
|
export { QueryClient } from './queryClient.cjs';
|
|
5
5
|
export { QueryCache } from './queryCache.cjs';
|
|
6
6
|
export { queryOptions } from './queryOptions.cjs';
|
|
7
|
+
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions } from './infiniteQueryOptions.cjs';
|
|
7
8
|
export { MutationCache } from './mutationCache.cjs';
|
|
8
9
|
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-DyulwJ8i.cjs';
|
|
9
10
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.cjs';
|
package/build/legacy/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.js';
|
|
|
4
4
|
export { QueryClient } from './queryClient.js';
|
|
5
5
|
export { QueryCache } from './queryCache.js';
|
|
6
6
|
export { queryOptions } from './queryOptions.js';
|
|
7
|
+
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions } from './infiniteQueryOptions.js';
|
|
7
8
|
export { MutationCache } from './mutationCache.js';
|
|
8
9
|
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-JLP2sK49.js';
|
|
9
10
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.js';
|
package/build/legacy/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { VueQueryPlugin } from "./vueQueryPlugin.js";
|
|
|
5
5
|
import { QueryClient } from "./queryClient.js";
|
|
6
6
|
import { QueryCache } from "./queryCache.js";
|
|
7
7
|
import { queryOptions } from "./queryOptions.js";
|
|
8
|
+
import { infiniteQueryOptions } from "./infiniteQueryOptions.js";
|
|
8
9
|
import { MutationCache } from "./mutationCache.js";
|
|
9
10
|
import { useQuery } from "./useQuery.js";
|
|
10
11
|
import { useQueries } from "./useQueries.js";
|
|
@@ -19,6 +20,7 @@ export {
|
|
|
19
20
|
QueryClient,
|
|
20
21
|
VUE_QUERY_CLIENT,
|
|
21
22
|
VueQueryPlugin,
|
|
23
|
+
infiniteQueryOptions,
|
|
22
24
|
queryOptions,
|
|
23
25
|
useInfiniteQuery,
|
|
24
26
|
useIsFetching,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { infiniteQueryOptions } from './infiniteQueryOptions'\nexport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AAKrC,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/infiniteQueryOptions.ts
|
|
21
|
+
var infiniteQueryOptions_exports = {};
|
|
22
|
+
__export(infiniteQueryOptions_exports, {
|
|
23
|
+
infiniteQueryOptions: () => infiniteQueryOptions
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(infiniteQueryOptions_exports);
|
|
26
|
+
function infiniteQueryOptions(options) {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
infiniteQueryOptions
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=infiniteQueryOptions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type { DataTag } from '@tanstack/query-core'\nimport type { InfiniteData } from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\nimport type { DefaultError, QueryKey } from '@tanstack/query-core'\n\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData?: undefined\n}\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2FO,SAAS,qBAAqB,SAAkB;AACrD,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { d as UseInfiniteQueryOptions } from './useQuery-DyulwJ8i.cjs';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.cjs';
|
|
5
|
+
import './types.cjs';
|
|
6
|
+
|
|
7
|
+
type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
8
|
+
initialData?: undefined;
|
|
9
|
+
};
|
|
10
|
+
type NonUndefinedGuard<T> = T extends undefined ? never : T;
|
|
11
|
+
type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
12
|
+
initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>);
|
|
13
|
+
};
|
|
14
|
+
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> & {
|
|
15
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
16
|
+
};
|
|
17
|
+
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> & {
|
|
18
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { type DefinedInitialDataInfiniteOptions, type UndefinedInitialDataInfiniteOptions, infiniteQueryOptions };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { d as UseInfiniteQueryOptions } from './useQuery-JLP2sK49.js';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.js';
|
|
5
|
+
import './types.js';
|
|
6
|
+
|
|
7
|
+
type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
8
|
+
initialData?: undefined;
|
|
9
|
+
};
|
|
10
|
+
type NonUndefinedGuard<T> = T extends undefined ? never : T;
|
|
11
|
+
type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
12
|
+
initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>);
|
|
13
|
+
};
|
|
14
|
+
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> & {
|
|
15
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
16
|
+
};
|
|
17
|
+
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> & {
|
|
18
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { type DefinedInitialDataInfiniteOptions, type UndefinedInitialDataInfiniteOptions, infiniteQueryOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type { DataTag } from '@tanstack/query-core'\nimport type { InfiniteData } from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\nimport type { DefaultError, QueryKey } from '@tanstack/query-core'\n\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData?: undefined\n}\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AA2FO,SAAS,qBAAqB,SAAkB;AACrD,SAAO;AACT;","names":[]}
|
package/build/modern/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(src_exports, {
|
|
|
26
26
|
QueryClient: () => import_queryClient.QueryClient,
|
|
27
27
|
VUE_QUERY_CLIENT: () => import_utils.VUE_QUERY_CLIENT,
|
|
28
28
|
VueQueryPlugin: () => import_vueQueryPlugin.VueQueryPlugin,
|
|
29
|
+
infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
|
|
29
30
|
queryOptions: () => import_queryOptions.queryOptions,
|
|
30
31
|
useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
|
|
31
32
|
useIsFetching: () => import_useIsFetching.useIsFetching,
|
|
@@ -43,6 +44,7 @@ var import_vueQueryPlugin = require("./vueQueryPlugin.cjs");
|
|
|
43
44
|
var import_queryClient = require("./queryClient.cjs");
|
|
44
45
|
var import_queryCache = require("./queryCache.cjs");
|
|
45
46
|
var import_queryOptions = require("./queryOptions.cjs");
|
|
47
|
+
var import_infiniteQueryOptions = require("./infiniteQueryOptions.cjs");
|
|
46
48
|
var import_mutationCache = require("./mutationCache.cjs");
|
|
47
49
|
var import_useQuery = require("./useQuery.cjs");
|
|
48
50
|
var import_useQueries = require("./useQueries.cjs");
|
|
@@ -58,6 +60,7 @@ var import_utils = require("./utils.cjs");
|
|
|
58
60
|
QueryClient,
|
|
59
61
|
VUE_QUERY_CLIENT,
|
|
60
62
|
VueQueryPlugin,
|
|
63
|
+
infiniteQueryOptions,
|
|
61
64
|
queryOptions,
|
|
62
65
|
useInfiniteQuery,
|
|
63
66
|
useIsFetching,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,0BAA6B;AAC7B,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { infiniteQueryOptions } from './infiniteQueryOptions'\nexport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,iCAAd;AAEA,4BAA+B;AAC/B,4BAA+B;AAE/B,yBAA4B;AAC5B,wBAA2B;AAC3B,0BAA6B;AAC7B,kCAAqC;AAKrC,2BAA8B;AAC9B,sBAAyB;AACzB,wBAA2B;AAC3B,8BAAiC;AACjC,yBAA4B;AAC5B,2BAA8B;AAC9B,8BAAgD;AAChD,mBAAiC;","names":[]}
|
package/build/modern/index.d.cts
CHANGED
|
@@ -4,6 +4,7 @@ export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.cjs';
|
|
|
4
4
|
export { QueryClient } from './queryClient.cjs';
|
|
5
5
|
export { QueryCache } from './queryCache.cjs';
|
|
6
6
|
export { queryOptions } from './queryOptions.cjs';
|
|
7
|
+
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions } from './infiniteQueryOptions.cjs';
|
|
7
8
|
export { MutationCache } from './mutationCache.cjs';
|
|
8
9
|
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-DyulwJ8i.cjs';
|
|
9
10
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.cjs';
|
package/build/modern/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.js';
|
|
|
4
4
|
export { QueryClient } from './queryClient.js';
|
|
5
5
|
export { QueryCache } from './queryCache.js';
|
|
6
6
|
export { queryOptions } from './queryOptions.js';
|
|
7
|
+
export { DefinedInitialDataInfiniteOptions, UndefinedInitialDataInfiniteOptions, infiniteQueryOptions } from './infiniteQueryOptions.js';
|
|
7
8
|
export { MutationCache } from './mutationCache.js';
|
|
8
9
|
export { d as UseInfiniteQueryOptions, e as UseInfiniteQueryReturnType, c as UseQueryDefinedReturnType, U as UseQueryOptions, b as UseQueryReturnType, a as useInfiniteQuery, u as useQuery } from './useQuery-JLP2sK49.js';
|
|
9
10
|
export { UseQueriesOptions, UseQueriesResults, useQueries } from './useQueries.js';
|
package/build/modern/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { VueQueryPlugin } from "./vueQueryPlugin.js";
|
|
|
5
5
|
import { QueryClient } from "./queryClient.js";
|
|
6
6
|
import { QueryCache } from "./queryCache.js";
|
|
7
7
|
import { queryOptions } from "./queryOptions.js";
|
|
8
|
+
import { infiniteQueryOptions } from "./infiniteQueryOptions.js";
|
|
8
9
|
import { MutationCache } from "./mutationCache.js";
|
|
9
10
|
import { useQuery } from "./useQuery.js";
|
|
10
11
|
import { useQueries } from "./useQueries.js";
|
|
@@ -19,6 +20,7 @@ export {
|
|
|
19
20
|
QueryClient,
|
|
20
21
|
VUE_QUERY_CLIENT,
|
|
21
22
|
VueQueryPlugin,
|
|
23
|
+
infiniteQueryOptions,
|
|
22
24
|
queryOptions,
|
|
23
25
|
useInfiniteQuery,
|
|
24
26
|
useIsFetching,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/query-core'\n\nexport { useQueryClient } from './useQueryClient'\nexport { VueQueryPlugin } from './vueQueryPlugin'\n\nexport { QueryClient } from './queryClient'\nexport { QueryCache } from './queryCache'\nexport { queryOptions } from './queryOptions'\nexport { infiniteQueryOptions } from './infiniteQueryOptions'\nexport type {\n DefinedInitialDataInfiniteOptions,\n UndefinedInitialDataInfiniteOptions,\n} from './infiniteQueryOptions'\nexport { MutationCache } from './mutationCache'\nexport { useQuery } from './useQuery'\nexport { useQueries } from './useQueries'\nexport { useInfiniteQuery } from './useInfiniteQuery'\nexport { useMutation } from './useMutation'\nexport { useIsFetching } from './useIsFetching'\nexport { useIsMutating, useMutationState } from './useMutationState'\nexport { VUE_QUERY_CLIENT } from './utils'\n\nexport type {\n UseQueryOptions,\n UseQueryReturnType,\n UseQueryDefinedReturnType,\n} from './useQuery'\nexport type {\n UseInfiniteQueryOptions,\n UseInfiniteQueryReturnType,\n} from './useInfiniteQuery'\nexport type { UseMutationOptions, UseMutationReturnType } from './useMutation'\nexport type { UseQueriesOptions, UseQueriesResults } from './useQueries'\nexport type { MutationFilters, MutationStateOptions } from './useMutationState'\nexport type { QueryFilters } from './useIsFetching'\nexport type { VueQueryPluginOptions } from './vueQueryPlugin'\n"],"mappings":";AAAA,cAAc;AAEd,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AAKrC,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,eAAe,wBAAwB;AAChD,SAAS,wBAAwB;","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/infiniteQueryOptions.ts
|
|
21
|
+
var infiniteQueryOptions_exports = {};
|
|
22
|
+
__export(infiniteQueryOptions_exports, {
|
|
23
|
+
infiniteQueryOptions: () => infiniteQueryOptions
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(infiniteQueryOptions_exports);
|
|
26
|
+
function infiniteQueryOptions(options) {
|
|
27
|
+
return options;
|
|
28
|
+
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
infiniteQueryOptions
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=infiniteQueryOptions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type { DataTag } from '@tanstack/query-core'\nimport type { InfiniteData } from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\nimport type { DefaultError, QueryKey } from '@tanstack/query-core'\n\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData?: undefined\n}\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2FO,SAAS,qBAAqB,SAAkB;AACrD,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { d as UseInfiniteQueryOptions } from './useQuery-DyulwJ8i.cjs';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.cjs';
|
|
5
|
+
import './types.cjs';
|
|
6
|
+
|
|
7
|
+
type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
8
|
+
initialData?: undefined;
|
|
9
|
+
};
|
|
10
|
+
type NonUndefinedGuard<T> = T extends undefined ? never : T;
|
|
11
|
+
type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
12
|
+
initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>);
|
|
13
|
+
};
|
|
14
|
+
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> & {
|
|
15
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
16
|
+
};
|
|
17
|
+
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> & {
|
|
18
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { type DefinedInitialDataInfiniteOptions, type UndefinedInitialDataInfiniteOptions, infiniteQueryOptions };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
+
import { d as UseInfiniteQueryOptions } from './useQuery-JLP2sK49.js';
|
|
3
|
+
import 'vue-demi';
|
|
4
|
+
import './queryClient.js';
|
|
5
|
+
import './types.js';
|
|
6
|
+
|
|
7
|
+
type UndefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
8
|
+
initialData?: undefined;
|
|
9
|
+
};
|
|
10
|
+
type NonUndefinedGuard<T> = T extends undefined ? never : T;
|
|
11
|
+
type DefinedInitialDataInfiniteOptions<TQueryFnData, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey, TPageParam> & {
|
|
12
|
+
initialData: NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>> | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>);
|
|
13
|
+
};
|
|
14
|
+
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> & {
|
|
15
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
16
|
+
};
|
|
17
|
+
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> & {
|
|
18
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { type DefinedInitialDataInfiniteOptions, type UndefinedInitialDataInfiniteOptions, infiniteQueryOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/infiniteQueryOptions.ts"],"sourcesContent":["import type { DataTag } from '@tanstack/query-core'\nimport type { InfiniteData } from '@tanstack/query-core'\nimport type { UseInfiniteQueryOptions } from './useInfiniteQuery'\nimport type { DefaultError, QueryKey } from '@tanstack/query-core'\n\nexport type UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData?: undefined\n}\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n> = UseInfiniteQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey,\n TPageParam\n> & {\n initialData:\n | NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>\n | (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): UndefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions<\n TQueryFnData,\n TError = DefaultError,\n TData = InfiniteData<TQueryFnData>,\n TQueryKey extends QueryKey = QueryKey,\n TPageParam = unknown,\n>(\n options: DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n >,\n): DefinedInitialDataInfiniteOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryKey,\n TPageParam\n> & {\n queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>\n}\n\nexport function infiniteQueryOptions(options: unknown) {\n return options\n}\n"],"mappings":";AA2FO,SAAS,qBAAqB,SAAkB;AACrD,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { describe, expectTypeOf, it } from 'vitest'
|
|
2
|
+
import { QueryClient, dataTagSymbol } from '@tanstack/query-core'
|
|
3
|
+
import { reactive } from 'vue-demi'
|
|
4
|
+
import { infiniteQueryOptions } from '../infiniteQueryOptions'
|
|
5
|
+
import { useInfiniteQuery } from '../useInfiniteQuery'
|
|
6
|
+
import type { InfiniteData } from '@tanstack/query-core'
|
|
7
|
+
|
|
8
|
+
describe('infiniteQueryOptions', () => {
|
|
9
|
+
it('should not allow excess properties', () => {
|
|
10
|
+
infiniteQueryOptions({
|
|
11
|
+
queryKey: ['key'],
|
|
12
|
+
queryFn: () => Promise.resolve('data'),
|
|
13
|
+
getNextPageParam: () => 1,
|
|
14
|
+
initialPageParam: 1,
|
|
15
|
+
// @ts-expect-error this is a good error, because stallTime does not exist!
|
|
16
|
+
stallTime: 1000,
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
it('should infer types for callbacks', () => {
|
|
20
|
+
infiniteQueryOptions({
|
|
21
|
+
queryKey: ['key'],
|
|
22
|
+
queryFn: () => Promise.resolve('data'),
|
|
23
|
+
staleTime: 1000,
|
|
24
|
+
getNextPageParam: () => 1,
|
|
25
|
+
initialPageParam: 1,
|
|
26
|
+
select: (data) => {
|
|
27
|
+
expectTypeOf(data).toEqualTypeOf<InfiniteData<string, number>>()
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
})
|
|
31
|
+
it('should work when passed to useInfiniteQuery', () => {
|
|
32
|
+
const options = infiniteQueryOptions({
|
|
33
|
+
queryKey: ['key'],
|
|
34
|
+
queryFn: () => Promise.resolve('string'),
|
|
35
|
+
getNextPageParam: () => 1,
|
|
36
|
+
initialPageParam: 1,
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const { data } = reactive(useInfiniteQuery(options))
|
|
40
|
+
|
|
41
|
+
expectTypeOf(data).toEqualTypeOf<
|
|
42
|
+
InfiniteData<string, unknown> | undefined
|
|
43
|
+
>()
|
|
44
|
+
})
|
|
45
|
+
it('should tag the queryKey with the result type of the QueryFn', () => {
|
|
46
|
+
const { queryKey } = infiniteQueryOptions({
|
|
47
|
+
queryKey: ['key'],
|
|
48
|
+
queryFn: () => Promise.resolve('string'),
|
|
49
|
+
getNextPageParam: () => 1,
|
|
50
|
+
initialPageParam: 1,
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
expectTypeOf(queryKey[dataTagSymbol]).toEqualTypeOf<InfiniteData<string>>()
|
|
54
|
+
})
|
|
55
|
+
it('should tag the queryKey even if no promise is returned', () => {
|
|
56
|
+
const { queryKey } = infiniteQueryOptions({
|
|
57
|
+
queryKey: ['key'],
|
|
58
|
+
queryFn: () => 'string',
|
|
59
|
+
getNextPageParam: () => 1,
|
|
60
|
+
initialPageParam: 1,
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
expectTypeOf(queryKey[dataTagSymbol]).toEqualTypeOf<InfiniteData<string>>()
|
|
64
|
+
})
|
|
65
|
+
it('should tag the queryKey with the result type of the QueryFn if select is used', () => {
|
|
66
|
+
const { queryKey } = infiniteQueryOptions({
|
|
67
|
+
queryKey: ['key'],
|
|
68
|
+
queryFn: () => Promise.resolve('string'),
|
|
69
|
+
select: (data) => data.pages,
|
|
70
|
+
getNextPageParam: () => 1,
|
|
71
|
+
initialPageParam: 1,
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
expectTypeOf(queryKey[dataTagSymbol]).toEqualTypeOf<InfiniteData<string>>()
|
|
75
|
+
})
|
|
76
|
+
it('should return the proper type when passed to getQueryData', () => {
|
|
77
|
+
const { queryKey } = infiniteQueryOptions({
|
|
78
|
+
queryKey: ['key'],
|
|
79
|
+
queryFn: () => Promise.resolve('string'),
|
|
80
|
+
getNextPageParam: () => 1,
|
|
81
|
+
initialPageParam: 1,
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
const queryClient = new QueryClient()
|
|
85
|
+
const data = queryClient.getQueryData(queryKey)
|
|
86
|
+
|
|
87
|
+
expectTypeOf(data).toEqualTypeOf<
|
|
88
|
+
InfiniteData<string, unknown> | undefined
|
|
89
|
+
>()
|
|
90
|
+
})
|
|
91
|
+
it('should properly type when passed to setQueryData', () => {
|
|
92
|
+
const { queryKey } = infiniteQueryOptions({
|
|
93
|
+
queryKey: ['key'],
|
|
94
|
+
queryFn: () => Promise.resolve('string'),
|
|
95
|
+
getNextPageParam: () => 1,
|
|
96
|
+
initialPageParam: 1,
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
const queryClient = new QueryClient()
|
|
100
|
+
const data = queryClient.setQueryData(queryKey, (prev) => {
|
|
101
|
+
expectTypeOf(prev).toEqualTypeOf<
|
|
102
|
+
InfiniteData<string, unknown> | undefined
|
|
103
|
+
>()
|
|
104
|
+
return prev
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
expectTypeOf(data).toEqualTypeOf<
|
|
108
|
+
InfiniteData<string, unknown> | undefined
|
|
109
|
+
>()
|
|
110
|
+
})
|
|
111
|
+
})
|
|
@@ -2,6 +2,7 @@ import { describe, expect, test, vi } from 'vitest'
|
|
|
2
2
|
import { ref } from 'vue-demi'
|
|
3
3
|
import { QueryClient as QueryClientOrigin } from '@tanstack/query-core'
|
|
4
4
|
import { QueryClient } from '../queryClient'
|
|
5
|
+
import { infiniteQueryOptions } from '../infiniteQueryOptions'
|
|
5
6
|
import { flushPromises } from './test-utils'
|
|
6
7
|
|
|
7
8
|
vi.mock('@tanstack/query-core')
|
|
@@ -264,6 +265,22 @@ describe('QueryCache', () => {
|
|
|
264
265
|
initialPageParam: 0,
|
|
265
266
|
})
|
|
266
267
|
|
|
268
|
+
expect(QueryClientOrigin.prototype.fetchInfiniteQuery).toBeCalledWith({
|
|
269
|
+
initialPageParam: 0,
|
|
270
|
+
queryKey: queryKeyUnref,
|
|
271
|
+
})
|
|
272
|
+
})
|
|
273
|
+
test('should properly unwrap parameter using infiniteQueryOptions with unref', async () => {
|
|
274
|
+
const queryClient = new QueryClient()
|
|
275
|
+
|
|
276
|
+
const options = infiniteQueryOptions({
|
|
277
|
+
queryKey: queryKeyUnref,
|
|
278
|
+
initialPageParam: 0,
|
|
279
|
+
getNextPageParam: () => 12,
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
queryClient.fetchInfiniteQuery(options)
|
|
283
|
+
|
|
267
284
|
expect(QueryClientOrigin.prototype.fetchInfiniteQuery).toBeCalledWith({
|
|
268
285
|
initialPageParam: 0,
|
|
269
286
|
queryKey: queryKeyUnref,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { describe, expect, test, vi } from 'vitest'
|
|
2
2
|
import { useInfiniteQuery } from '../useInfiniteQuery'
|
|
3
|
+
import { infiniteQueryOptions } from '../infiniteQueryOptions'
|
|
3
4
|
import { flushPromises, infiniteFetcher } from './test-utils'
|
|
4
5
|
|
|
5
6
|
vi.mock('../useQueryClient')
|
|
@@ -28,6 +29,37 @@ describe('useQuery', () => {
|
|
|
28
29
|
|
|
29
30
|
await flushPromises()
|
|
30
31
|
|
|
32
|
+
expect(data.value).toStrictEqual({
|
|
33
|
+
pageParams: [0, 12],
|
|
34
|
+
pages: ['data on page 0', 'data on page 12'],
|
|
35
|
+
})
|
|
36
|
+
expect(status.value).toStrictEqual('success')
|
|
37
|
+
})
|
|
38
|
+
test('should properly execute infinite query using infiniteQueryOptions', async () => {
|
|
39
|
+
const options = infiniteQueryOptions({
|
|
40
|
+
queryKey: ['infiniteQueryOptions'],
|
|
41
|
+
queryFn: infiniteFetcher,
|
|
42
|
+
initialPageParam: 0,
|
|
43
|
+
getNextPageParam: () => 12,
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
const { data, fetchNextPage, status } = useInfiniteQuery(options)
|
|
47
|
+
|
|
48
|
+
expect(data.value).toStrictEqual(undefined)
|
|
49
|
+
expect(status.value).toStrictEqual('pending')
|
|
50
|
+
|
|
51
|
+
await flushPromises()
|
|
52
|
+
|
|
53
|
+
expect(data.value).toStrictEqual({
|
|
54
|
+
pageParams: [0],
|
|
55
|
+
pages: ['data on page 0'],
|
|
56
|
+
})
|
|
57
|
+
expect(status.value).toStrictEqual('success')
|
|
58
|
+
|
|
59
|
+
fetchNextPage()
|
|
60
|
+
|
|
61
|
+
await flushPromises()
|
|
62
|
+
|
|
31
63
|
expect(data.value).toStrictEqual({
|
|
32
64
|
pageParams: [0, 12],
|
|
33
65
|
pages: ['data on page 0', 'data on page 12'],
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,11 @@ export { VueQueryPlugin } from './vueQueryPlugin'
|
|
|
6
6
|
export { QueryClient } from './queryClient'
|
|
7
7
|
export { QueryCache } from './queryCache'
|
|
8
8
|
export { queryOptions } from './queryOptions'
|
|
9
|
+
export { infiniteQueryOptions } from './infiniteQueryOptions'
|
|
10
|
+
export type {
|
|
11
|
+
DefinedInitialDataInfiniteOptions,
|
|
12
|
+
UndefinedInitialDataInfiniteOptions,
|
|
13
|
+
} from './infiniteQueryOptions'
|
|
9
14
|
export { MutationCache } from './mutationCache'
|
|
10
15
|
export { useQuery } from './useQuery'
|
|
11
16
|
export { useQueries } from './useQueries'
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { DataTag } from '@tanstack/query-core'
|
|
2
|
+
import type { InfiniteData } from '@tanstack/query-core'
|
|
3
|
+
import type { UseInfiniteQueryOptions } from './useInfiniteQuery'
|
|
4
|
+
import type { DefaultError, QueryKey } from '@tanstack/query-core'
|
|
5
|
+
|
|
6
|
+
export type UndefinedInitialDataInfiniteOptions<
|
|
7
|
+
TQueryFnData,
|
|
8
|
+
TError = DefaultError,
|
|
9
|
+
TData = InfiniteData<TQueryFnData>,
|
|
10
|
+
TQueryKey extends QueryKey = QueryKey,
|
|
11
|
+
TPageParam = unknown,
|
|
12
|
+
> = UseInfiniteQueryOptions<
|
|
13
|
+
TQueryFnData,
|
|
14
|
+
TError,
|
|
15
|
+
TData,
|
|
16
|
+
TQueryFnData,
|
|
17
|
+
TQueryKey,
|
|
18
|
+
TPageParam
|
|
19
|
+
> & {
|
|
20
|
+
initialData?: undefined
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type NonUndefinedGuard<T> = T extends undefined ? never : T
|
|
24
|
+
|
|
25
|
+
export type DefinedInitialDataInfiniteOptions<
|
|
26
|
+
TQueryFnData,
|
|
27
|
+
TError = DefaultError,
|
|
28
|
+
TData = InfiniteData<TQueryFnData>,
|
|
29
|
+
TQueryKey extends QueryKey = QueryKey,
|
|
30
|
+
TPageParam = unknown,
|
|
31
|
+
> = UseInfiniteQueryOptions<
|
|
32
|
+
TQueryFnData,
|
|
33
|
+
TError,
|
|
34
|
+
TData,
|
|
35
|
+
TQueryFnData,
|
|
36
|
+
TQueryKey,
|
|
37
|
+
TPageParam
|
|
38
|
+
> & {
|
|
39
|
+
initialData:
|
|
40
|
+
| NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>
|
|
41
|
+
| (() => NonUndefinedGuard<InfiniteData<TQueryFnData, TPageParam>>)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function infiniteQueryOptions<
|
|
45
|
+
TQueryFnData,
|
|
46
|
+
TError = DefaultError,
|
|
47
|
+
TData = InfiniteData<TQueryFnData>,
|
|
48
|
+
TQueryKey extends QueryKey = QueryKey,
|
|
49
|
+
TPageParam = unknown,
|
|
50
|
+
>(
|
|
51
|
+
options: UndefinedInitialDataInfiniteOptions<
|
|
52
|
+
TQueryFnData,
|
|
53
|
+
TError,
|
|
54
|
+
TData,
|
|
55
|
+
TQueryKey,
|
|
56
|
+
TPageParam
|
|
57
|
+
>,
|
|
58
|
+
): UndefinedInitialDataInfiniteOptions<
|
|
59
|
+
TQueryFnData,
|
|
60
|
+
TError,
|
|
61
|
+
TData,
|
|
62
|
+
TQueryKey,
|
|
63
|
+
TPageParam
|
|
64
|
+
> & {
|
|
65
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function infiniteQueryOptions<
|
|
69
|
+
TQueryFnData,
|
|
70
|
+
TError = DefaultError,
|
|
71
|
+
TData = InfiniteData<TQueryFnData>,
|
|
72
|
+
TQueryKey extends QueryKey = QueryKey,
|
|
73
|
+
TPageParam = unknown,
|
|
74
|
+
>(
|
|
75
|
+
options: DefinedInitialDataInfiniteOptions<
|
|
76
|
+
TQueryFnData,
|
|
77
|
+
TError,
|
|
78
|
+
TData,
|
|
79
|
+
TQueryKey,
|
|
80
|
+
TPageParam
|
|
81
|
+
>,
|
|
82
|
+
): DefinedInitialDataInfiniteOptions<
|
|
83
|
+
TQueryFnData,
|
|
84
|
+
TError,
|
|
85
|
+
TData,
|
|
86
|
+
TQueryKey,
|
|
87
|
+
TPageParam
|
|
88
|
+
> & {
|
|
89
|
+
queryKey: DataTag<TQueryKey, InfiniteData<TQueryFnData>>
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function infiniteQueryOptions(options: unknown) {
|
|
93
|
+
return options
|
|
94
|
+
}
|