@tanstack/vue-query 5.74.7 → 5.74.8
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/devtools/devtools.d.cts +1 -1
- package/build/legacy/devtools/devtools.d.ts +1 -1
- package/build/legacy/index.d.cts +1 -1
- package/build/legacy/index.d.ts +1 -1
- package/build/legacy/infiniteQueryOptions.d.cts +1 -1
- package/build/legacy/infiniteQueryOptions.d.ts +1 -1
- package/build/legacy/{queryClient-DlZcK5cH.d.ts → queryClient-C8o7zS9z.d.ts} +2 -2
- package/build/legacy/{queryClient-BAAUSDNa.d.cts → queryClient-Cl_mjj55.d.cts} +2 -2
- package/build/legacy/queryClient.d.cts +1 -1
- package/build/legacy/queryClient.d.ts +1 -1
- package/build/legacy/queryOptions.d.cts +1 -1
- package/build/legacy/queryOptions.d.ts +1 -1
- package/build/legacy/useBaseQuery.d.cts +1 -1
- package/build/legacy/useBaseQuery.d.ts +1 -1
- package/build/legacy/useInfiniteQuery.d.cts +1 -1
- package/build/legacy/useInfiniteQuery.d.ts +1 -1
- package/build/legacy/useIsFetching.d.cts +1 -1
- package/build/legacy/useIsFetching.d.ts +1 -1
- package/build/legacy/useMutation.d.cts +1 -1
- package/build/legacy/useMutation.d.ts +1 -1
- package/build/legacy/useMutationState.d.cts +1 -1
- package/build/legacy/useMutationState.d.ts +1 -1
- package/build/legacy/useQueries.d.cts +1 -1
- package/build/legacy/useQueries.d.ts +1 -1
- package/build/legacy/useQuery.cjs.map +1 -1
- package/build/legacy/useQuery.d.cts +1 -1
- package/build/legacy/useQuery.d.ts +1 -1
- package/build/legacy/useQuery.js.map +1 -1
- package/build/legacy/useQueryClient.d.cts +1 -1
- package/build/legacy/useQueryClient.d.ts +1 -1
- package/build/legacy/vueQueryPlugin.d.cts +1 -1
- package/build/legacy/vueQueryPlugin.d.ts +1 -1
- package/build/modern/devtools/devtools.d.cts +1 -1
- package/build/modern/devtools/devtools.d.ts +1 -1
- package/build/modern/index.d.cts +1 -1
- package/build/modern/index.d.ts +1 -1
- package/build/modern/infiniteQueryOptions.d.cts +1 -1
- package/build/modern/infiniteQueryOptions.d.ts +1 -1
- package/build/modern/{queryClient-DlZcK5cH.d.ts → queryClient-C8o7zS9z.d.ts} +2 -2
- package/build/modern/{queryClient-BAAUSDNa.d.cts → queryClient-Cl_mjj55.d.cts} +2 -2
- package/build/modern/queryClient.d.cts +1 -1
- package/build/modern/queryClient.d.ts +1 -1
- package/build/modern/queryOptions.d.cts +1 -1
- package/build/modern/queryOptions.d.ts +1 -1
- package/build/modern/useBaseQuery.d.cts +1 -1
- package/build/modern/useBaseQuery.d.ts +1 -1
- package/build/modern/useInfiniteQuery.d.cts +1 -1
- package/build/modern/useInfiniteQuery.d.ts +1 -1
- package/build/modern/useIsFetching.d.cts +1 -1
- package/build/modern/useIsFetching.d.ts +1 -1
- package/build/modern/useMutation.d.cts +1 -1
- package/build/modern/useMutation.d.ts +1 -1
- package/build/modern/useMutationState.d.cts +1 -1
- package/build/modern/useMutationState.d.ts +1 -1
- package/build/modern/useQueries.d.cts +1 -1
- package/build/modern/useQueries.d.ts +1 -1
- package/build/modern/useQuery.cjs.map +1 -1
- package/build/modern/useQuery.d.cts +1 -1
- package/build/modern/useQuery.d.ts +1 -1
- package/build/modern/useQuery.js.map +1 -1
- package/build/modern/useQueryClient.d.cts +1 -1
- package/build/modern/useQueryClient.d.ts +1 -1
- package/build/modern/vueQueryPlugin.d.cts +1 -1
- package/build/modern/vueQueryPlugin.d.ts +1 -1
- package/package.json +1 -1
- package/src/useQuery.ts +1 -5
package/build/legacy/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from '@tanstack/query-core';
|
|
2
2
|
export { useQueryClient } from './useQueryClient.cjs';
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.cjs';
|
|
4
|
-
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-
|
|
4
|
+
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-Cl_mjj55.cjs';
|
|
5
5
|
export { QueryCache } from './queryCache.cjs';
|
|
6
6
|
export { queryOptions } from './queryOptions.cjs';
|
|
7
7
|
export { MutationCache } from './mutationCache.cjs';
|
package/build/legacy/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from '@tanstack/query-core';
|
|
2
2
|
export { useQueryClient } from './useQueryClient.js';
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.js';
|
|
4
|
-
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-
|
|
4
|
+
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-C8o7zS9z.js';
|
|
5
5
|
export { QueryCache } from './queryCache.js';
|
|
6
6
|
export { queryOptions } from './queryOptions.js';
|
|
7
7
|
export { MutationCache } from './mutationCache.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-
|
|
2
|
+
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-Cl_mjj55.cjs';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-
|
|
2
|
+
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-C8o7zS9z.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions,
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions, DefinedQueryObserverResult, QueryClient as QueryClient$1, QueryFilters, MutationFilters, InferDataFromTag, EnsureQueryDataOptions, Updater, NoInfer, SetDataOptions, QueryState, InferErrorFromTag, ResetOptions, CancelOptions, InvalidateQueryFilters, InvalidateOptions, RefetchQueryFilters, RefetchOptions, FetchQueryOptions, FetchInfiniteQueryOptions, DefaultOptions, OmitKeyof, MutationKey, MutationObserverOptions } from '@tanstack/query-core';
|
|
2
2
|
import { Ref } from 'vue-demi';
|
|
3
3
|
import { MaybeRef, MaybeRefOrGetter, DeepUnwrapRef, MaybeRefDeep, QueryClientConfig, NoUnknown } from './types.js';
|
|
4
4
|
|
|
@@ -44,7 +44,7 @@ type UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQue
|
|
|
44
44
|
shallow?: boolean;
|
|
45
45
|
}>;
|
|
46
46
|
type UndefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
47
|
-
initialData?: undefined |
|
|
47
|
+
initialData?: undefined | (() => undefined);
|
|
48
48
|
};
|
|
49
49
|
type DefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
50
50
|
initialData: NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions,
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions, DefinedQueryObserverResult, QueryClient as QueryClient$1, QueryFilters, MutationFilters, InferDataFromTag, EnsureQueryDataOptions, Updater, NoInfer, SetDataOptions, QueryState, InferErrorFromTag, ResetOptions, CancelOptions, InvalidateQueryFilters, InvalidateOptions, RefetchQueryFilters, RefetchOptions, FetchQueryOptions, FetchInfiniteQueryOptions, DefaultOptions, OmitKeyof, MutationKey, MutationObserverOptions } from '@tanstack/query-core';
|
|
2
2
|
import { Ref } from 'vue-demi';
|
|
3
3
|
import { MaybeRef, MaybeRefOrGetter, DeepUnwrapRef, MaybeRefDeep, QueryClientConfig, NoUnknown } from './types.cjs';
|
|
4
4
|
|
|
@@ -44,7 +44,7 @@ type UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQue
|
|
|
44
44
|
shallow?: boolean;
|
|
45
45
|
}>;
|
|
46
46
|
type UndefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
47
|
-
initialData?: undefined |
|
|
47
|
+
initialData?: undefined | (() => undefined);
|
|
48
48
|
};
|
|
49
49
|
type DefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
50
50
|
initialData: NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
-
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-
|
|
2
|
+
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-Cl_mjj55.cjs';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.cjs';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
-
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-
|
|
2
|
+
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-C8o7zS9z.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.js';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-
|
|
1
|
+
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-Cl_mjj55.cjs';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './types.cjs';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-
|
|
1
|
+
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-C8o7zS9z.js';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryFilters as QueryFilters$1 } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep } from './types.cjs';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
5
5
|
|
|
6
6
|
type QueryFilters = MaybeRefDeep<QueryFilters$1>;
|
|
7
7
|
declare function useIsFetching(fetchingFilters?: MaybeRefDeep<QueryFilters$1>, queryClient?: QueryClient): Ref<number>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryFilters as QueryFilters$1 } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep } from './types.js';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
5
5
|
|
|
6
6
|
type QueryFilters = MaybeRefDeep<QueryFilters$1>;
|
|
7
7
|
declare function useIsFetching(fetchingFilters?: MaybeRefDeep<QueryFilters$1>, queryClient?: QueryClient): Ref<number>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToRefs } from 'vue-demi';
|
|
2
2
|
import { DefaultError, MutationObserverOptions, MutationObserverResult, MutateFunction } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep, DistributiveOmit } from './types.cjs';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
5
5
|
|
|
6
6
|
type MutationResult<TData, TError, TVariables, TContext> = DistributiveOmit<MutationObserverResult<TData, TError, TVariables, TContext>, 'mutate' | 'reset'>;
|
|
7
7
|
type UseMutationOptionsBase<TData, TError, TVariables, TContext> = MutationObserverOptions<TData, TError, TVariables, TContext> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToRefs } from 'vue-demi';
|
|
2
2
|
import { DefaultError, MutationObserverOptions, MutationObserverResult, MutateFunction } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep, DistributiveOmit } from './types.js';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
5
5
|
|
|
6
6
|
type MutationResult<TData, TError, TVariables, TContext> = DistributiveOmit<MutationObserverResult<TData, TError, TVariables, TContext>, 'mutate' | 'reset'>;
|
|
7
7
|
type UseMutationOptionsBase<TData, TError, TVariables, TContext> = MutationObserverOptions<TData, TError, TVariables, TContext> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { MutationFilters as MutationFilters$1, MutationState, Mutation } from '@tanstack/query-core';
|
|
3
|
-
import { Q as QueryClient } from './queryClient-
|
|
3
|
+
import { Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
4
4
|
import { MaybeRefDeep } from './types.cjs';
|
|
5
5
|
|
|
6
6
|
type MutationFilters = MaybeRefDeep<MutationFilters$1>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { MutationFilters as MutationFilters$1, MutationState, Mutation } from '@tanstack/query-core';
|
|
3
|
-
import { Q as QueryClient } from './queryClient-
|
|
3
|
+
import { Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
4
4
|
import { MaybeRefDeep } from './types.js';
|
|
5
5
|
|
|
6
6
|
type MutationFilters = MaybeRefDeep<MutationFilters$1>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, DefinedQueryObserverResult, DefaultError, QueryFunction, ThrowOnError, QueryKey } from '@tanstack/query-core';
|
|
3
|
-
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-
|
|
3
|
+
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
4
4
|
import { MaybeRefDeep, DeepUnwrapRef } from './types.cjs';
|
|
5
5
|
|
|
6
6
|
type UseQueryOptionsForUseQueries<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, DefinedQueryObserverResult, DefaultError, QueryFunction, ThrowOnError, QueryKey } from '@tanstack/query-core';
|
|
3
|
-
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-
|
|
3
|
+
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
4
4
|
import { MaybeRefDeep, DeepUnwrapRef } from './types.js';
|
|
5
5
|
|
|
6
6
|
type UseQueryOptionsForUseQueries<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n
|
|
1
|
+
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n QueryKey,\n QueryObserverOptions,\n} from '@tanstack/query-core'\nimport type { UseBaseQueryReturnType } from './useBaseQuery'\nimport type {\n DeepUnwrapRef,\n MaybeRef,\n MaybeRefDeep,\n MaybeRefOrGetter,\n} from './types'\nimport type { QueryClient } from './queryClient'\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = MaybeRef<\n {\n [Property in keyof QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >]: Property extends 'enabled'\n ? MaybeRefOrGetter<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n : MaybeRefDeep<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n } & {\n /**\n * Return data in a shallow ref object (it is `false` by default). It can be set to `true` to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.\n */\n shallow?: boolean\n }\n>\n\nexport type UndefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData?: undefined | (() => undefined)\n}\n\nexport type DefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData:\n | NonUndefinedGuard<TQueryFnData>\n | (() => NonUndefinedGuard<TQueryFnData>)\n}\n\nexport type UseQueryReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError\n>\n\nexport type UseQueryDefinedReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError,\n DefinedQueryObserverResult<TData, TError>\n>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryDefinedReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n):\n | UseQueryReturnType<TData, TError>\n | UseQueryDefinedReturnType<TData, TError> {\n return useBaseQuery(QueryObserver, options, queryClient)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA8B;AAC9B,0BAA6B;AA8HtB,SAAS,SAMd,SAOA,aAG2C;AAC3C,aAAO,kCAAa,iCAAe,SAAS,WAAW;AACzD;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-
|
|
2
|
+
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-Cl_mjj55.cjs';
|
|
3
3
|
import './types.cjs';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-
|
|
2
|
+
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-C8o7zS9z.js';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n
|
|
1
|
+
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n QueryKey,\n QueryObserverOptions,\n} from '@tanstack/query-core'\nimport type { UseBaseQueryReturnType } from './useBaseQuery'\nimport type {\n DeepUnwrapRef,\n MaybeRef,\n MaybeRefDeep,\n MaybeRefOrGetter,\n} from './types'\nimport type { QueryClient } from './queryClient'\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = MaybeRef<\n {\n [Property in keyof QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >]: Property extends 'enabled'\n ? MaybeRefOrGetter<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n : MaybeRefDeep<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n } & {\n /**\n * Return data in a shallow ref object (it is `false` by default). It can be set to `true` to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.\n */\n shallow?: boolean\n }\n>\n\nexport type UndefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData?: undefined | (() => undefined)\n}\n\nexport type DefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData:\n | NonUndefinedGuard<TQueryFnData>\n | (() => NonUndefinedGuard<TQueryFnData>)\n}\n\nexport type UseQueryReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError\n>\n\nexport type UseQueryDefinedReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError,\n DefinedQueryObserverResult<TData, TError>\n>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryDefinedReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n):\n | UseQueryReturnType<TData, TError>\n | UseQueryDefinedReturnType<TData, TError> {\n return useBaseQuery(QueryObserver, options, queryClient)\n}\n"],"mappings":";AAAA,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AA8HtB,SAAS,SAMd,SAOA,aAG2C;AAC3C,SAAO,aAAa,eAAe,SAAS,WAAW;AACzD;","names":[]}
|
package/build/modern/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from '@tanstack/query-core';
|
|
2
2
|
export { useQueryClient } from './useQueryClient.cjs';
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.cjs';
|
|
4
|
-
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-
|
|
4
|
+
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-Cl_mjj55.cjs';
|
|
5
5
|
export { QueryCache } from './queryCache.cjs';
|
|
6
6
|
export { queryOptions } from './queryOptions.cjs';
|
|
7
7
|
export { MutationCache } from './mutationCache.cjs';
|
package/build/modern/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from '@tanstack/query-core';
|
|
2
2
|
export { useQueryClient } from './useQueryClient.js';
|
|
3
3
|
export { VueQueryPlugin, VueQueryPluginOptions } from './vueQueryPlugin.js';
|
|
4
|
-
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-
|
|
4
|
+
export { D as DefinedInitialDataInfiniteOptions, f as DefinedInitialQueryOptions, Q as QueryClient, U as UndefinedInitialDataInfiniteOptions, e as UndefinedInitialQueryOptions, g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, i as infiniteQueryOptions, a as useInfiniteQuery, u as useQuery } from './queryClient-C8o7zS9z.js';
|
|
5
5
|
export { QueryCache } from './queryCache.js';
|
|
6
6
|
export { queryOptions } from './queryOptions.js';
|
|
7
7
|
export { MutationCache } from './mutationCache.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-
|
|
2
|
+
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-Cl_mjj55.cjs';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-
|
|
2
|
+
export { D as DefinedInitialDataInfiniteOptions, U as UndefinedInitialDataInfiniteOptions, i as infiniteQueryOptions } from './queryClient-C8o7zS9z.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions,
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions, DefinedQueryObserverResult, QueryClient as QueryClient$1, QueryFilters, MutationFilters, InferDataFromTag, EnsureQueryDataOptions, Updater, NoInfer, SetDataOptions, QueryState, InferErrorFromTag, ResetOptions, CancelOptions, InvalidateQueryFilters, InvalidateOptions, RefetchQueryFilters, RefetchOptions, FetchQueryOptions, FetchInfiniteQueryOptions, DefaultOptions, OmitKeyof, MutationKey, MutationObserverOptions } from '@tanstack/query-core';
|
|
2
2
|
import { Ref } from 'vue-demi';
|
|
3
3
|
import { MaybeRef, MaybeRefOrGetter, DeepUnwrapRef, MaybeRefDeep, QueryClientConfig, NoUnknown } from './types.js';
|
|
4
4
|
|
|
@@ -44,7 +44,7 @@ type UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQue
|
|
|
44
44
|
shallow?: boolean;
|
|
45
45
|
}>;
|
|
46
46
|
type UndefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
47
|
-
initialData?: undefined |
|
|
47
|
+
initialData?: undefined | (() => undefined);
|
|
48
48
|
};
|
|
49
49
|
type DefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
50
50
|
initialData: NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions,
|
|
1
|
+
import { DefaultError, InfiniteData, QueryKey, DataTag, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, QueryObserverResult, QueryObserver, QueryObserverOptions, DefinedQueryObserverResult, QueryClient as QueryClient$1, QueryFilters, MutationFilters, InferDataFromTag, EnsureQueryDataOptions, Updater, NoInfer, SetDataOptions, QueryState, InferErrorFromTag, ResetOptions, CancelOptions, InvalidateQueryFilters, InvalidateOptions, RefetchQueryFilters, RefetchOptions, FetchQueryOptions, FetchInfiniteQueryOptions, DefaultOptions, OmitKeyof, MutationKey, MutationObserverOptions } from '@tanstack/query-core';
|
|
2
2
|
import { Ref } from 'vue-demi';
|
|
3
3
|
import { MaybeRef, MaybeRefOrGetter, DeepUnwrapRef, MaybeRefDeep, QueryClientConfig, NoUnknown } from './types.cjs';
|
|
4
4
|
|
|
@@ -44,7 +44,7 @@ type UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQue
|
|
|
44
44
|
shallow?: boolean;
|
|
45
45
|
}>;
|
|
46
46
|
type UndefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
47
|
-
initialData?: undefined |
|
|
47
|
+
initialData?: undefined | (() => undefined);
|
|
48
48
|
};
|
|
49
49
|
type DefinedInitialQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
50
50
|
initialData: NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
-
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-
|
|
2
|
+
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-Cl_mjj55.cjs';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.cjs';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultError, QueryKey, DataTag } from '@tanstack/query-core';
|
|
2
|
-
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-
|
|
2
|
+
import { e as UndefinedInitialQueryOptions, f as DefinedInitialQueryOptions } from './queryClient-C8o7zS9z.js';
|
|
3
3
|
import 'vue-demi';
|
|
4
4
|
import './types.js';
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-
|
|
1
|
+
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-Cl_mjj55.cjs';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './types.cjs';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-
|
|
1
|
+
export { g as UseInfiniteQueryOptions, h as UseInfiniteQueryReturnType, a as useInfiniteQuery } from './queryClient-C8o7zS9z.js';
|
|
2
2
|
import '@tanstack/query-core';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryFilters as QueryFilters$1 } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep } from './types.cjs';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
5
5
|
|
|
6
6
|
type QueryFilters = MaybeRefDeep<QueryFilters$1>;
|
|
7
7
|
declare function useIsFetching(fetchingFilters?: MaybeRefDeep<QueryFilters$1>, queryClient?: QueryClient): Ref<number>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryFilters as QueryFilters$1 } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep } from './types.js';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
5
5
|
|
|
6
6
|
type QueryFilters = MaybeRefDeep<QueryFilters$1>;
|
|
7
7
|
declare function useIsFetching(fetchingFilters?: MaybeRefDeep<QueryFilters$1>, queryClient?: QueryClient): Ref<number>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToRefs } from 'vue-demi';
|
|
2
2
|
import { DefaultError, MutationObserverOptions, MutationObserverResult, MutateFunction } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep, DistributiveOmit } from './types.cjs';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
5
5
|
|
|
6
6
|
type MutationResult<TData, TError, TVariables, TContext> = DistributiveOmit<MutationObserverResult<TData, TError, TVariables, TContext>, 'mutate' | 'reset'>;
|
|
7
7
|
type UseMutationOptionsBase<TData, TError, TVariables, TContext> = MutationObserverOptions<TData, TError, TVariables, TContext> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToRefs } from 'vue-demi';
|
|
2
2
|
import { DefaultError, MutationObserverOptions, MutationObserverResult, MutateFunction } from '@tanstack/query-core';
|
|
3
3
|
import { MaybeRefDeep, DistributiveOmit } from './types.js';
|
|
4
|
-
import { Q as QueryClient } from './queryClient-
|
|
4
|
+
import { Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
5
5
|
|
|
6
6
|
type MutationResult<TData, TError, TVariables, TContext> = DistributiveOmit<MutationObserverResult<TData, TError, TVariables, TContext>, 'mutate' | 'reset'>;
|
|
7
7
|
type UseMutationOptionsBase<TData, TError, TVariables, TContext> = MutationObserverOptions<TData, TError, TVariables, TContext> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { MutationFilters as MutationFilters$1, MutationState, Mutation } from '@tanstack/query-core';
|
|
3
|
-
import { Q as QueryClient } from './queryClient-
|
|
3
|
+
import { Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
4
4
|
import { MaybeRefDeep } from './types.cjs';
|
|
5
5
|
|
|
6
6
|
type MutationFilters = MaybeRefDeep<MutationFilters$1>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { MutationFilters as MutationFilters$1, MutationState, Mutation } from '@tanstack/query-core';
|
|
3
|
-
import { Q as QueryClient } from './queryClient-
|
|
3
|
+
import { Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
4
4
|
import { MaybeRefDeep } from './types.js';
|
|
5
5
|
|
|
6
6
|
type MutationFilters = MaybeRefDeep<MutationFilters$1>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, DefinedQueryObserverResult, DefaultError, QueryFunction, ThrowOnError, QueryKey } from '@tanstack/query-core';
|
|
3
|
-
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-
|
|
3
|
+
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-Cl_mjj55.cjs';
|
|
4
4
|
import { MaybeRefDeep, DeepUnwrapRef } from './types.cjs';
|
|
5
5
|
|
|
6
6
|
type UseQueryOptionsForUseQueries<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue-demi';
|
|
2
2
|
import { QueryObserverResult, DefinedQueryObserverResult, DefaultError, QueryFunction, ThrowOnError, QueryKey } from '@tanstack/query-core';
|
|
3
|
-
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-
|
|
3
|
+
import { b as UseQueryOptions, Q as QueryClient } from './queryClient-C8o7zS9z.js';
|
|
4
4
|
import { MaybeRefDeep, DeepUnwrapRef } from './types.js';
|
|
5
5
|
|
|
6
6
|
type UseQueryOptionsForUseQueries<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n
|
|
1
|
+
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n QueryKey,\n QueryObserverOptions,\n} from '@tanstack/query-core'\nimport type { UseBaseQueryReturnType } from './useBaseQuery'\nimport type {\n DeepUnwrapRef,\n MaybeRef,\n MaybeRefDeep,\n MaybeRefOrGetter,\n} from './types'\nimport type { QueryClient } from './queryClient'\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = MaybeRef<\n {\n [Property in keyof QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >]: Property extends 'enabled'\n ? MaybeRefOrGetter<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n : MaybeRefDeep<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n } & {\n /**\n * Return data in a shallow ref object (it is `false` by default). It can be set to `true` to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.\n */\n shallow?: boolean\n }\n>\n\nexport type UndefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData?: undefined | (() => undefined)\n}\n\nexport type DefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData:\n | NonUndefinedGuard<TQueryFnData>\n | (() => NonUndefinedGuard<TQueryFnData>)\n}\n\nexport type UseQueryReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError\n>\n\nexport type UseQueryDefinedReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError,\n DefinedQueryObserverResult<TData, TError>\n>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryDefinedReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n):\n | UseQueryReturnType<TData, TError>\n | UseQueryDefinedReturnType<TData, TError> {\n return useBaseQuery(QueryObserver, options, queryClient)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAA8B;AAC9B,0BAA6B;AA8HtB,SAAS,SAMd,SAOA,aAG2C;AAC3C,aAAO,kCAAa,iCAAe,SAAS,WAAW;AACzD;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-
|
|
2
|
+
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-Cl_mjj55.cjs';
|
|
3
3
|
import './types.cjs';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@tanstack/query-core';
|
|
2
|
-
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-
|
|
2
|
+
export { f as DefinedInitialQueryOptions, e as UndefinedInitialQueryOptions, d as UseQueryDefinedReturnType, b as UseQueryOptions, c as UseQueryReturnType, u as useQuery } from './queryClient-C8o7zS9z.js';
|
|
3
3
|
import './types.js';
|
|
4
4
|
import 'vue-demi';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n
|
|
1
|
+
{"version":3,"sources":["../../src/useQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefaultError,\n DefinedQueryObserverResult,\n QueryKey,\n QueryObserverOptions,\n} from '@tanstack/query-core'\nimport type { UseBaseQueryReturnType } from './useBaseQuery'\nimport type {\n DeepUnwrapRef,\n MaybeRef,\n MaybeRefDeep,\n MaybeRefOrGetter,\n} from './types'\nimport type { QueryClient } from './queryClient'\n\ntype NonUndefinedGuard<T> = T extends undefined ? never : T\n\nexport type UseQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = MaybeRef<\n {\n [Property in keyof QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n TQueryKey\n >]: Property extends 'enabled'\n ? MaybeRefOrGetter<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n : MaybeRefDeep<\n QueryObserverOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryData,\n DeepUnwrapRef<TQueryKey>\n >[Property]\n >\n } & {\n /**\n * Return data in a shallow ref object (it is `false` by default). It can be set to `true` to return data in a shallow ref object, which can improve performance if your data does not need to be deeply reactive.\n */\n shallow?: boolean\n }\n>\n\nexport type UndefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData?: undefined | (() => undefined)\n}\n\nexport type DefinedInitialQueryOptions<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {\n initialData:\n | NonUndefinedGuard<TQueryFnData>\n | (() => NonUndefinedGuard<TQueryFnData>)\n}\n\nexport type UseQueryReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError\n>\n\nexport type UseQueryDefinedReturnType<TData, TError> = UseBaseQueryReturnType<\n TData,\n TError,\n DefinedQueryObserverResult<TData, TError>\n>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UndefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: DefinedInitialQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n queryClient?: QueryClient,\n): UseQueryDefinedReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData = unknown,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n): UseQueryReturnType<TData, TError>\n\nexport function useQuery<\n TQueryFnData,\n TError = DefaultError,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(\n options: UseQueryOptions<\n TQueryFnData,\n TError,\n TData,\n TQueryFnData,\n TQueryKey\n >,\n queryClient?: QueryClient,\n):\n | UseQueryReturnType<TData, TError>\n | UseQueryDefinedReturnType<TData, TError> {\n return useBaseQuery(QueryObserver, options, queryClient)\n}\n"],"mappings":";AAAA,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AA8HtB,SAAS,SAMd,SAOA,aAG2C;AAC3C,SAAO,aAAa,eAAe,SAAS,WAAW;AACzD;","names":[]}
|
package/package.json
CHANGED
package/src/useQuery.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { useBaseQuery } from './useBaseQuery'
|
|
|
3
3
|
import type {
|
|
4
4
|
DefaultError,
|
|
5
5
|
DefinedQueryObserverResult,
|
|
6
|
-
InitialDataFunction,
|
|
7
6
|
QueryKey,
|
|
8
7
|
QueryObserverOptions,
|
|
9
8
|
} from '@tanstack/query-core'
|
|
@@ -65,10 +64,7 @@ export type UndefinedInitialQueryOptions<
|
|
|
65
64
|
TData = TQueryFnData,
|
|
66
65
|
TQueryKey extends QueryKey = QueryKey,
|
|
67
66
|
> = UseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey> & {
|
|
68
|
-
initialData?:
|
|
69
|
-
| undefined
|
|
70
|
-
| InitialDataFunction<NonUndefinedGuard<TQueryFnData>>
|
|
71
|
-
| NonUndefinedGuard<TQueryFnData>
|
|
67
|
+
initialData?: undefined | (() => undefined)
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
export type DefinedInitialQueryOptions<
|