@tanstack/preact-query 5.102.2 → 5.102.4
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/HydrationBoundary.cjs +43 -0
- package/build/legacy/HydrationBoundary.cjs.map +1 -1
- package/build/legacy/HydrationBoundary.d.cts +61 -0
- package/build/legacy/HydrationBoundary.d.cts.map +1 -1
- package/build/legacy/HydrationBoundary.d.ts +61 -0
- package/build/legacy/HydrationBoundary.d.ts.map +1 -1
- package/build/legacy/HydrationBoundary.js +43 -0
- package/build/legacy/HydrationBoundary.js.map +1 -1
- package/build/legacy/IsRestoringProvider.cjs +11 -0
- package/build/legacy/IsRestoringProvider.cjs.map +1 -1
- package/build/legacy/IsRestoringProvider.d.cts +11 -0
- package/build/legacy/IsRestoringProvider.d.cts.map +1 -1
- package/build/legacy/IsRestoringProvider.d.ts +11 -0
- package/build/legacy/IsRestoringProvider.d.ts.map +1 -1
- package/build/legacy/IsRestoringProvider.js +11 -0
- package/build/legacy/IsRestoringProvider.js.map +1 -1
- package/build/legacy/QueryClientProvider.cjs +30 -0
- package/build/legacy/QueryClientProvider.cjs.map +1 -1
- package/build/legacy/QueryClientProvider.d.cts +41 -0
- package/build/legacy/QueryClientProvider.d.cts.map +1 -1
- package/build/legacy/QueryClientProvider.d.ts +41 -0
- package/build/legacy/QueryClientProvider.d.ts.map +1 -1
- package/build/legacy/QueryClientProvider.js +30 -0
- package/build/legacy/QueryClientProvider.js.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.cjs +75 -0
- package/build/legacy/QueryErrorResetBoundary.cjs.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.d.cts +106 -0
- package/build/legacy/QueryErrorResetBoundary.d.cts.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.d.ts +106 -0
- package/build/legacy/QueryErrorResetBoundary.d.ts.map +1 -1
- package/build/legacy/QueryErrorResetBoundary.js +75 -0
- package/build/legacy/QueryErrorResetBoundary.js.map +1 -1
- package/build/legacy/infiniteQueryOptions.cjs.map +1 -1
- package/build/legacy/infiniteQueryOptions.d.cts +187 -0
- package/build/legacy/infiniteQueryOptions.d.cts.map +1 -1
- package/build/legacy/infiniteQueryOptions.d.ts +187 -0
- package/build/legacy/infiniteQueryOptions.d.ts.map +1 -1
- package/build/legacy/infiniteQueryOptions.js.map +1 -1
- package/build/legacy/mutationOptions.cjs.map +1 -1
- package/build/legacy/mutationOptions.d.cts +68 -0
- package/build/legacy/mutationOptions.d.cts.map +1 -1
- package/build/legacy/mutationOptions.d.ts +68 -0
- package/build/legacy/mutationOptions.d.ts.map +1 -1
- package/build/legacy/mutationOptions.js.map +1 -1
- package/build/legacy/queryOptions.cjs.map +1 -1
- package/build/legacy/queryOptions.d.cts +198 -0
- package/build/legacy/queryOptions.d.cts.map +1 -1
- package/build/legacy/queryOptions.d.ts +198 -0
- package/build/legacy/queryOptions.d.ts.map +1 -1
- package/build/legacy/queryOptions.js.map +1 -1
- package/build/legacy/types.cjs.map +1 -1
- package/build/legacy/types.d.cts +228 -2
- package/build/legacy/types.d.cts.map +1 -1
- package/build/legacy/types.d.ts +228 -2
- package/build/legacy/types.d.ts.map +1 -1
- package/build/legacy/types.js.map +1 -1
- package/build/legacy/useInfiniteQuery.cjs.map +1 -1
- package/build/legacy/useInfiniteQuery.d.cts +116 -0
- package/build/legacy/useInfiniteQuery.d.cts.map +1 -1
- package/build/legacy/useInfiniteQuery.d.ts +116 -0
- package/build/legacy/useInfiniteQuery.d.ts.map +1 -1
- package/build/legacy/useInfiniteQuery.js.map +1 -1
- package/build/legacy/useIsFetching.cjs +20 -0
- package/build/legacy/useIsFetching.cjs.map +1 -1
- package/build/legacy/useIsFetching.d.cts +20 -0
- package/build/legacy/useIsFetching.d.cts.map +1 -1
- package/build/legacy/useIsFetching.d.ts +20 -0
- package/build/legacy/useIsFetching.d.ts.map +1 -1
- package/build/legacy/useIsFetching.js +20 -0
- package/build/legacy/useIsFetching.js.map +1 -1
- package/build/legacy/useMutation.cjs +67 -0
- package/build/legacy/useMutation.cjs.map +1 -1
- package/build/legacy/useMutation.d.cts +67 -0
- package/build/legacy/useMutation.d.cts.map +1 -1
- package/build/legacy/useMutation.d.ts +67 -0
- package/build/legacy/useMutation.d.ts.map +1 -1
- package/build/legacy/useMutation.js +67 -0
- package/build/legacy/useMutation.js.map +1 -1
- package/build/legacy/useMutationState.cjs +74 -0
- package/build/legacy/useMutationState.cjs.map +1 -1
- package/build/legacy/useMutationState.d.cts +74 -0
- package/build/legacy/useMutationState.d.cts.map +1 -1
- package/build/legacy/useMutationState.d.ts +74 -0
- package/build/legacy/useMutationState.d.ts.map +1 -1
- package/build/legacy/useMutationState.js +74 -0
- package/build/legacy/useMutationState.js.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.cjs +44 -0
- package/build/legacy/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.cts +44 -0
- package/build/legacy/usePrefetchInfiniteQuery.d.cts.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.d.ts +44 -0
- package/build/legacy/usePrefetchInfiniteQuery.d.ts.map +1 -1
- package/build/legacy/usePrefetchInfiniteQuery.js +44 -0
- package/build/legacy/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/legacy/usePrefetchQuery.cjs +36 -1
- package/build/legacy/usePrefetchQuery.cjs.map +1 -1
- package/build/legacy/usePrefetchQuery.d.cts +35 -0
- package/build/legacy/usePrefetchQuery.d.cts.map +1 -1
- package/build/legacy/usePrefetchQuery.d.ts +35 -0
- package/build/legacy/usePrefetchQuery.d.ts.map +1 -1
- package/build/legacy/usePrefetchQuery.js +36 -1
- package/build/legacy/usePrefetchQuery.js.map +1 -1
- package/build/legacy/useQueries.cjs +50 -0
- package/build/legacy/useQueries.cjs.map +1 -1
- package/build/legacy/useQueries.d.cts +85 -2
- package/build/legacy/useQueries.d.cts.map +1 -1
- package/build/legacy/useQueries.d.ts +85 -2
- package/build/legacy/useQueries.d.ts.map +1 -1
- package/build/legacy/useQueries.js +50 -0
- package/build/legacy/useQueries.js.map +1 -1
- package/build/legacy/useQuery.cjs.map +1 -1
- package/build/legacy/useQuery.d.cts +134 -0
- package/build/legacy/useQuery.d.cts.map +1 -1
- package/build/legacy/useQuery.d.ts +134 -0
- package/build/legacy/useQuery.d.ts.map +1 -1
- package/build/legacy/useQuery.js.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.cjs +48 -0
- package/build/legacy/useSuspenseInfiniteQuery.cjs.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.d.cts +48 -0
- package/build/legacy/useSuspenseInfiniteQuery.d.cts.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.d.ts +48 -0
- package/build/legacy/useSuspenseInfiniteQuery.d.ts.map +1 -1
- package/build/legacy/useSuspenseInfiniteQuery.js +48 -0
- package/build/legacy/useSuspenseInfiniteQuery.js.map +1 -1
- package/build/legacy/useSuspenseQueries.cjs.map +1 -1
- package/build/legacy/useSuspenseQueries.d.cts +128 -2
- package/build/legacy/useSuspenseQueries.d.cts.map +1 -1
- package/build/legacy/useSuspenseQueries.d.ts +128 -2
- package/build/legacy/useSuspenseQueries.d.ts.map +1 -1
- package/build/legacy/useSuspenseQueries.js.map +1 -1
- package/build/legacy/useSuspenseQuery.cjs +43 -0
- package/build/legacy/useSuspenseQuery.cjs.map +1 -1
- package/build/legacy/useSuspenseQuery.d.cts +43 -0
- package/build/legacy/useSuspenseQuery.d.cts.map +1 -1
- package/build/legacy/useSuspenseQuery.d.ts +43 -0
- package/build/legacy/useSuspenseQuery.d.ts.map +1 -1
- package/build/legacy/useSuspenseQuery.js +43 -0
- package/build/legacy/useSuspenseQuery.js.map +1 -1
- package/build/legacy/utils.cjs.map +1 -1
- package/build/legacy/utils.d.cts.map +1 -1
- package/build/legacy/utils.d.ts.map +1 -1
- package/build/legacy/utils.js.map +1 -1
- package/build/modern/HydrationBoundary.cjs +43 -0
- package/build/modern/HydrationBoundary.cjs.map +1 -1
- package/build/modern/HydrationBoundary.d.cts +61 -0
- package/build/modern/HydrationBoundary.d.cts.map +1 -1
- package/build/modern/HydrationBoundary.d.ts +61 -0
- package/build/modern/HydrationBoundary.d.ts.map +1 -1
- package/build/modern/HydrationBoundary.js +43 -0
- package/build/modern/HydrationBoundary.js.map +1 -1
- package/build/modern/IsRestoringProvider.cjs +11 -0
- package/build/modern/IsRestoringProvider.cjs.map +1 -1
- package/build/modern/IsRestoringProvider.d.cts +11 -0
- package/build/modern/IsRestoringProvider.d.cts.map +1 -1
- package/build/modern/IsRestoringProvider.d.ts +11 -0
- package/build/modern/IsRestoringProvider.d.ts.map +1 -1
- package/build/modern/IsRestoringProvider.js +11 -0
- package/build/modern/IsRestoringProvider.js.map +1 -1
- package/build/modern/QueryClientProvider.cjs +30 -0
- package/build/modern/QueryClientProvider.cjs.map +1 -1
- package/build/modern/QueryClientProvider.d.cts +41 -0
- package/build/modern/QueryClientProvider.d.cts.map +1 -1
- package/build/modern/QueryClientProvider.d.ts +41 -0
- package/build/modern/QueryClientProvider.d.ts.map +1 -1
- package/build/modern/QueryClientProvider.js +30 -0
- package/build/modern/QueryClientProvider.js.map +1 -1
- package/build/modern/QueryErrorResetBoundary.cjs +75 -0
- package/build/modern/QueryErrorResetBoundary.cjs.map +1 -1
- package/build/modern/QueryErrorResetBoundary.d.cts +106 -0
- package/build/modern/QueryErrorResetBoundary.d.cts.map +1 -1
- package/build/modern/QueryErrorResetBoundary.d.ts +106 -0
- package/build/modern/QueryErrorResetBoundary.d.ts.map +1 -1
- package/build/modern/QueryErrorResetBoundary.js +75 -0
- package/build/modern/QueryErrorResetBoundary.js.map +1 -1
- package/build/modern/infiniteQueryOptions.cjs.map +1 -1
- package/build/modern/infiniteQueryOptions.d.cts +187 -0
- package/build/modern/infiniteQueryOptions.d.cts.map +1 -1
- package/build/modern/infiniteQueryOptions.d.ts +187 -0
- package/build/modern/infiniteQueryOptions.d.ts.map +1 -1
- package/build/modern/infiniteQueryOptions.js.map +1 -1
- package/build/modern/mutationOptions.cjs.map +1 -1
- package/build/modern/mutationOptions.d.cts +68 -0
- package/build/modern/mutationOptions.d.cts.map +1 -1
- package/build/modern/mutationOptions.d.ts +68 -0
- package/build/modern/mutationOptions.d.ts.map +1 -1
- package/build/modern/mutationOptions.js.map +1 -1
- package/build/modern/queryOptions.cjs.map +1 -1
- package/build/modern/queryOptions.d.cts +198 -0
- package/build/modern/queryOptions.d.cts.map +1 -1
- package/build/modern/queryOptions.d.ts +198 -0
- package/build/modern/queryOptions.d.ts.map +1 -1
- package/build/modern/queryOptions.js.map +1 -1
- package/build/modern/types.cjs.map +1 -1
- package/build/modern/types.d.cts +228 -2
- package/build/modern/types.d.cts.map +1 -1
- package/build/modern/types.d.ts +228 -2
- package/build/modern/types.d.ts.map +1 -1
- package/build/modern/types.js.map +1 -1
- package/build/modern/useInfiniteQuery.cjs.map +1 -1
- package/build/modern/useInfiniteQuery.d.cts +116 -0
- package/build/modern/useInfiniteQuery.d.cts.map +1 -1
- package/build/modern/useInfiniteQuery.d.ts +116 -0
- package/build/modern/useInfiniteQuery.d.ts.map +1 -1
- package/build/modern/useInfiniteQuery.js.map +1 -1
- package/build/modern/useIsFetching.cjs +20 -0
- package/build/modern/useIsFetching.cjs.map +1 -1
- package/build/modern/useIsFetching.d.cts +20 -0
- package/build/modern/useIsFetching.d.cts.map +1 -1
- package/build/modern/useIsFetching.d.ts +20 -0
- package/build/modern/useIsFetching.d.ts.map +1 -1
- package/build/modern/useIsFetching.js +20 -0
- package/build/modern/useIsFetching.js.map +1 -1
- package/build/modern/useMutation.cjs +67 -0
- package/build/modern/useMutation.cjs.map +1 -1
- package/build/modern/useMutation.d.cts +67 -0
- package/build/modern/useMutation.d.cts.map +1 -1
- package/build/modern/useMutation.d.ts +67 -0
- package/build/modern/useMutation.d.ts.map +1 -1
- package/build/modern/useMutation.js +67 -0
- package/build/modern/useMutation.js.map +1 -1
- package/build/modern/useMutationState.cjs +74 -0
- package/build/modern/useMutationState.cjs.map +1 -1
- package/build/modern/useMutationState.d.cts +74 -0
- package/build/modern/useMutationState.d.cts.map +1 -1
- package/build/modern/useMutationState.d.ts +74 -0
- package/build/modern/useMutationState.d.ts.map +1 -1
- package/build/modern/useMutationState.js +74 -0
- package/build/modern/useMutationState.js.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.cjs +44 -0
- package/build/modern/usePrefetchInfiniteQuery.cjs.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.cts +44 -0
- package/build/modern/usePrefetchInfiniteQuery.d.cts.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.d.ts +44 -0
- package/build/modern/usePrefetchInfiniteQuery.d.ts.map +1 -1
- package/build/modern/usePrefetchInfiniteQuery.js +44 -0
- package/build/modern/usePrefetchInfiniteQuery.js.map +1 -1
- package/build/modern/usePrefetchQuery.cjs +36 -1
- package/build/modern/usePrefetchQuery.cjs.map +1 -1
- package/build/modern/usePrefetchQuery.d.cts +35 -0
- package/build/modern/usePrefetchQuery.d.cts.map +1 -1
- package/build/modern/usePrefetchQuery.d.ts +35 -0
- package/build/modern/usePrefetchQuery.d.ts.map +1 -1
- package/build/modern/usePrefetchQuery.js +36 -1
- package/build/modern/usePrefetchQuery.js.map +1 -1
- package/build/modern/useQueries.cjs +50 -0
- package/build/modern/useQueries.cjs.map +1 -1
- package/build/modern/useQueries.d.cts +85 -2
- package/build/modern/useQueries.d.cts.map +1 -1
- package/build/modern/useQueries.d.ts +85 -2
- package/build/modern/useQueries.d.ts.map +1 -1
- package/build/modern/useQueries.js +50 -0
- package/build/modern/useQueries.js.map +1 -1
- package/build/modern/useQuery.cjs.map +1 -1
- package/build/modern/useQuery.d.cts +134 -0
- package/build/modern/useQuery.d.cts.map +1 -1
- package/build/modern/useQuery.d.ts +134 -0
- package/build/modern/useQuery.d.ts.map +1 -1
- package/build/modern/useQuery.js.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.cjs +48 -0
- package/build/modern/useSuspenseInfiniteQuery.cjs.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.d.cts +48 -0
- package/build/modern/useSuspenseInfiniteQuery.d.cts.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.d.ts +48 -0
- package/build/modern/useSuspenseInfiniteQuery.d.ts.map +1 -1
- package/build/modern/useSuspenseInfiniteQuery.js +48 -0
- package/build/modern/useSuspenseInfiniteQuery.js.map +1 -1
- package/build/modern/useSuspenseQueries.cjs.map +1 -1
- package/build/modern/useSuspenseQueries.d.cts +128 -2
- package/build/modern/useSuspenseQueries.d.cts.map +1 -1
- package/build/modern/useSuspenseQueries.d.ts +128 -2
- package/build/modern/useSuspenseQueries.d.ts.map +1 -1
- package/build/modern/useSuspenseQueries.js.map +1 -1
- package/build/modern/useSuspenseQuery.cjs +43 -0
- package/build/modern/useSuspenseQuery.cjs.map +1 -1
- package/build/modern/useSuspenseQuery.d.cts +43 -0
- package/build/modern/useSuspenseQuery.d.cts.map +1 -1
- package/build/modern/useSuspenseQuery.d.ts +43 -0
- package/build/modern/useSuspenseQuery.d.ts.map +1 -1
- package/build/modern/useSuspenseQuery.js +43 -0
- package/build/modern/useSuspenseQuery.js.map +1 -1
- package/build/modern/utils.cjs.map +1 -1
- package/build/modern/utils.d.cts.map +1 -1
- package/build/modern/utils.d.ts.map +1 -1
- package/build/modern/utils.js.map +1 -1
- package/package.json +3 -3
- package/src/HydrationBoundary.tsx +61 -1
- package/src/IsRestoringProvider.ts +12 -0
- package/src/QueryClientProvider.tsx +41 -0
- package/src/QueryErrorResetBoundary.tsx +109 -0
- package/src/infiniteQueryOptions.ts +187 -0
- package/src/mutationOptions.ts +68 -0
- package/src/queryOptions.ts +198 -0
- package/src/types.ts +228 -2
- package/src/useInfiniteQuery.ts +116 -0
- package/src/useIsFetching.ts +20 -0
- package/src/useMutation.ts +67 -0
- package/src/useMutationState.ts +74 -0
- package/src/usePrefetchInfiniteQuery.tsx +44 -0
- package/src/usePrefetchQuery.tsx +36 -1
- package/src/useQueries.ts +85 -2
- package/src/useQuery.ts +134 -0
- package/src/useSuspenseInfiniteQuery.ts +48 -0
- package/src/useSuspenseQueries.ts +128 -2
- package/src/useSuspenseQuery.ts +43 -0
- package/src/utils.ts +0 -1
package/build/modern/types.d.cts
CHANGED
|
@@ -1,53 +1,279 @@
|
|
|
1
1
|
import { DefaultError, DefinedInfiniteQueryObserverResult, DefinedQueryObserverResult, DistributiveOmit, InfiniteData, InfiniteQueryExecuteOptions, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, MutateFunction, MutationObserverOptions, MutationObserverResult, OmitKeyof, Override, QueryExecuteOptions, QueryKey, QueryObserverOptions, QueryObserverResult, SkipToken } from "@tanstack/query-core";
|
|
2
2
|
//#region src/types.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* {@link UseBaseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
5
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
6
|
+
*/
|
|
3
7
|
type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any>;
|
|
8
|
+
/**
|
|
9
|
+
* The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from
|
|
10
|
+
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.
|
|
11
|
+
*
|
|
12
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
13
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
14
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
15
|
+
* `select` is used.
|
|
16
|
+
* @template TQueryData - The type of the data actually held in the query cache — the input to `select` and
|
|
17
|
+
* `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.
|
|
18
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
19
|
+
*/
|
|
4
20
|
interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
|
|
5
21
|
/**
|
|
6
22
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
7
|
-
*
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue true
|
|
8
25
|
*/
|
|
9
26
|
subscribed?: boolean;
|
|
10
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`
|
|
30
|
+
* is required unless a default query function has been defined.
|
|
31
|
+
*
|
|
32
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
33
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
34
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
35
|
+
* `select` is used.
|
|
36
|
+
* @template TQueryData - The type of the data actually held in the query cache — the input to `select` and
|
|
37
|
+
* `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.
|
|
38
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
39
|
+
*/
|
|
11
40
|
type UsePrefetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = DistributiveOmit<QueryExecuteOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, 'queryFn'> & {
|
|
41
|
+
/**
|
|
42
|
+
* `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,
|
|
43
|
+
* unless a default query function has been defined.
|
|
44
|
+
*/
|
|
12
45
|
queryFn?: Exclude<QueryExecuteOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>['queryFn'], SkipToken>;
|
|
13
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,
|
|
49
|
+
* except `queryFn` is required unless a default query function has been defined.
|
|
50
|
+
*
|
|
51
|
+
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
52
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
53
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` (a single page)
|
|
54
|
+
* here, since a prefetch never reads `data` back out — this parameter only matters if you reuse these options
|
|
55
|
+
* elsewhere with `select` applied.
|
|
56
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
57
|
+
* @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
|
|
58
|
+
*/
|
|
14
59
|
type UsePrefetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = DistributiveOmit<InfiniteQueryExecuteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn'> & {
|
|
60
|
+
/**
|
|
61
|
+
* `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,
|
|
62
|
+
* unless a default query function has been defined.
|
|
63
|
+
*/
|
|
15
64
|
queryFn?: Exclude<InfiniteQueryExecuteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
|
|
16
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* {@link UseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
68
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
69
|
+
*/
|
|
17
70
|
type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>;
|
|
71
|
+
/**
|
|
72
|
+
* The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which
|
|
73
|
+
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
74
|
+
*
|
|
75
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
76
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
77
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
78
|
+
* `select` is used.
|
|
79
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
80
|
+
*/
|
|
18
81
|
interface UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'suspense'> {}
|
|
82
|
+
/**
|
|
83
|
+
* {@link UseSuspenseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
84
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
85
|
+
*/
|
|
19
86
|
type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any, any>;
|
|
87
|
+
/**
|
|
88
|
+
* The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,
|
|
89
|
+
* and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so those options
|
|
90
|
+
* don't apply.
|
|
91
|
+
*
|
|
92
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
93
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
94
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
95
|
+
* `select` is used.
|
|
96
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
97
|
+
*/
|
|
20
98
|
interface UseSuspenseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
|
99
|
+
/**
|
|
100
|
+
* `skipToken` is not allowed here — Suspense hooks cannot render a "disabled" state, so a query function
|
|
101
|
+
* must always be provided, unless a default query function has been defined.
|
|
102
|
+
*/
|
|
21
103
|
queryFn?: Exclude<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken>;
|
|
22
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* {@link UseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
107
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
108
|
+
*/
|
|
23
109
|
type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any, any, any>;
|
|
110
|
+
/**
|
|
111
|
+
* The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from
|
|
112
|
+
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which
|
|
113
|
+
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
114
|
+
*
|
|
115
|
+
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
116
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
117
|
+
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
118
|
+
* the shape of all fetched pages plus their page params.
|
|
119
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
120
|
+
* @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
|
|
121
|
+
*/
|
|
24
122
|
interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
|
|
25
123
|
/**
|
|
26
124
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
27
|
-
*
|
|
125
|
+
*
|
|
126
|
+
* @defaultValue true
|
|
28
127
|
*/
|
|
29
128
|
subscribed?: boolean;
|
|
30
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* {@link UseSuspenseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types
|
|
132
|
+
* aren't relevant, e.g. when accepting options for any query in a helper function.
|
|
133
|
+
*/
|
|
31
134
|
type AnyUseSuspenseInfiniteQueryOptions = UseSuspenseInfiniteQueryOptions<any, any, any, any, any>;
|
|
135
|
+
/**
|
|
136
|
+
* The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,
|
|
137
|
+
* `throwOnError`, and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so
|
|
138
|
+
* those options don't apply.
|
|
139
|
+
*
|
|
140
|
+
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
141
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
142
|
+
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
143
|
+
* the shape of all fetched pages plus their page params.
|
|
144
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
145
|
+
* @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
|
|
146
|
+
*/
|
|
32
147
|
interface UseSuspenseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
|
148
|
+
/**
|
|
149
|
+
* `skipToken` is not allowed here — Suspense hooks cannot render a "disabled" state, so a query function
|
|
150
|
+
* must always be provided, unless a default query function has been defined.
|
|
151
|
+
*/
|
|
33
152
|
queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
|
|
34
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
156
|
+
* `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns
|
|
157
|
+
* {@link UseInfiniteQueryResult} instead.
|
|
158
|
+
*
|
|
159
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
160
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
161
|
+
*/
|
|
35
162
|
type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
|
|
163
|
+
/**
|
|
164
|
+
* The result of `useQuery`. Same as {@link UseBaseQueryResult}.
|
|
165
|
+
*
|
|
166
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
167
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
168
|
+
*/
|
|
36
169
|
type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQueryResult<TData, TError>;
|
|
170
|
+
/**
|
|
171
|
+
* The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always
|
|
172
|
+
* `false` on that type, so this drops the dead field rather than an active state.
|
|
173
|
+
*
|
|
174
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
175
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
176
|
+
*/
|
|
37
177
|
type UseSuspenseQueryResult<TData = unknown, TError = DefaultError> = DistributiveOmit<DefinedQueryObserverResult<TData, TError>, 'isPlaceholderData'>;
|
|
178
|
+
/**
|
|
179
|
+
* The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`
|
|
180
|
+
* omission — `data` is never `undefined`. Re-exports {@link DefinedQueryObserverResult} from
|
|
181
|
+
* `@tanstack/query-core`.
|
|
182
|
+
*
|
|
183
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
184
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
185
|
+
*/
|
|
38
186
|
type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = DefinedQueryObserverResult<TData, TError>;
|
|
187
|
+
/**
|
|
188
|
+
* The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
189
|
+
* `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.
|
|
190
|
+
*
|
|
191
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
192
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
193
|
+
*/
|
|
39
194
|
type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = InfiniteQueryObserverResult<TData, TError>;
|
|
195
|
+
/**
|
|
196
|
+
* The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined`. Re-exports
|
|
197
|
+
* {@link DefinedInfiniteQueryObserverResult} from `@tanstack/query-core`.
|
|
198
|
+
*
|
|
199
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
200
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
201
|
+
*/
|
|
40
202
|
type DefinedUseInfiniteQueryResult<TData = unknown, TError = DefaultError> = DefinedInfiniteQueryObserverResult<TData, TError>;
|
|
203
|
+
/**
|
|
204
|
+
* The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus
|
|
205
|
+
* `isPlaceholderData` — Suspense hooks never render placeholder data.
|
|
206
|
+
*
|
|
207
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
208
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
209
|
+
*/
|
|
41
210
|
type UseSuspenseInfiniteQueryResult<TData = unknown, TError = DefaultError> = OmitKeyof<DefinedInfiniteQueryObserverResult<TData, TError>, 'isPlaceholderData'>;
|
|
211
|
+
/**
|
|
212
|
+
* {@link UseMutationOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
213
|
+
* relevant, e.g. when accepting options for any mutation in a helper function.
|
|
214
|
+
*/
|
|
42
215
|
type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>;
|
|
216
|
+
/**
|
|
217
|
+
* The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,
|
|
218
|
+
* minus the internal `_defaulted` flag.
|
|
219
|
+
*
|
|
220
|
+
* @template TData - The type your mutation function resolves to.
|
|
221
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
222
|
+
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
223
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
224
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
225
|
+
*/
|
|
43
226
|
interface UseMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> extends OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, '_defaulted'> {}
|
|
227
|
+
/**
|
|
228
|
+
* The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call
|
|
229
|
+
* `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced
|
|
230
|
+
* through the mutation result, not thrown.
|
|
231
|
+
*
|
|
232
|
+
* @template TData - The type your mutation function resolves to.
|
|
233
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
234
|
+
* @template TVariables - The type of the variable passed to `mutate`.
|
|
235
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
236
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
237
|
+
*/
|
|
44
238
|
type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TOnMutateResult>>) => void;
|
|
239
|
+
/**
|
|
240
|
+
* The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a
|
|
241
|
+
* promise which can be awaited.
|
|
242
|
+
*
|
|
243
|
+
* @template TData - The type your mutation function resolves to.
|
|
244
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
245
|
+
* @template TVariables - The type of the variable passed to `mutateAsync`.
|
|
246
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
247
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
248
|
+
*/
|
|
45
249
|
type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = MutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
|
250
|
+
/**
|
|
251
|
+
* The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with
|
|
252
|
+
* `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.
|
|
253
|
+
*
|
|
254
|
+
* @template TData - The type your mutation function resolves to.
|
|
255
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
256
|
+
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
257
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
258
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
259
|
+
*/
|
|
46
260
|
type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TOnMutateResult>, {
|
|
47
261
|
mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
|
48
262
|
}> & {
|
|
263
|
+
/**
|
|
264
|
+
* Similar to `mutate`, but returns a promise which can be awaited.
|
|
265
|
+
*/
|
|
49
266
|
mutateAsync: UseMutateAsyncFunction<TData, TError, TVariables, TOnMutateResult>;
|
|
50
267
|
};
|
|
268
|
+
/**
|
|
269
|
+
* The result of `useMutation`. Same as {@link UseBaseMutationResult}.
|
|
270
|
+
*
|
|
271
|
+
* @template TData - The type your mutation function resolves to.
|
|
272
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
273
|
+
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
274
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
275
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
276
|
+
*/
|
|
51
277
|
type UseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>;
|
|
52
278
|
//#endregion
|
|
53
279
|
export { AnyUseBaseQueryOptions, AnyUseInfiniteQueryOptions, AnyUseMutationOptions, AnyUseQueryOptions, AnyUseSuspenseInfiniteQueryOptions, AnyUseSuspenseQueryOptions, DefinedUseInfiniteQueryResult, DefinedUseQueryResult, UseBaseMutationResult, UseBaseQueryOptions, UseBaseQueryResult, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutateAsyncFunction, UseMutateFunction, UseMutationOptions, UseMutationResult, UsePrefetchInfiniteQueryOptions, UsePrefetchQueryOptions, UseQueryOptions, UseQueryResult, UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;KA0BY,yBAAyB;;;;;;;;;;;;;UAmBpB,oBACf,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,kBACrB,qBACR,cACA,QACA,OACA,YACA;;;;;;EAOA;;;;;;;;;;;;;;KAeU,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,YAC3B,iBACF,oBAAoB,cAAc,QAAQ,OAAO,YAAY;;;;;EAO7D,UAAU,QACR,oBACE,cACA,QACA,OACA,cACA,uBAEF;;;;;;;;;;;;;;KAgBQ,gCACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,iBACF,4BACE,cACA,QACA,OACA,WACA;;;;;EAQF,UAAU,QACR,4BACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;KAQQ,qBAAqB;;;;;;;;;;;UAWhB,gBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,oBAAoB,cAAc,QAAQ,OAAO,cAAc;;;;;KAQrD,6BAA6B;;;;;;;;;;;;UAiBxB,wBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,gBAAgB,cAAc,QAAQ,OAAO;;;;;EAO7C,UAAU,QACR,gBAAgB,cAAc,QAAQ,OAAO,uBAC7C;;;;;;KAQQ,6BAA6B;;;;;;;;;;;;;UAmBxB,wBACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,6BACE,cACA,QACA,OACA,WACA;;;;;;EASF;;;;;;KAOU,qCACV;;;;;;;;;;;;;UAae,gCACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;EAOhE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;;;;;KAYQ,mBACV,iBACA,SAAS,gBACP,oBAAoB,OAAO;;;;;;;KAQnB,eACV,iBACA,SAAS,gBACP,mBAAmB,OAAO;;;;;;;;KASlB,uBACV,iBACA,SAAS,gBACP,iBACF,2BAA2B,OAAO;;;;;;;;;KAYxB,sBACV,iBACA,SAAS,gBACP,2BAA2B,OAAO;;;;;;;;KAS1B,uBACV,iBACA,SAAS,gBACP,4BAA4B,OAAO;;;;;;;;KAS3B,8BACV,iBACA,SAAS,gBACP,mCAAmC,OAAO;;;;;;;;KASlC,+BACV,iBACA,SAAS,gBACP,UACF,mCAAmC,OAAO;;;;;KAQhC,wBAAwB;;;;;;;;;;;UAWnB,mBACf,iBACA,SAAS,cACT,mBACA,mCACQ,UACR,wBAAwB,OAAO,QAAQ,YAAY;;;;;;;;;;;;KAezC,kBACV,iBACA,SAAS,cACT,mBACA,iCAEG,MAAM,WACP,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;;KAclC,uBACV,iBACA,SAAS,cACT,mBACA,6BACE,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;;KAYlC,sBACV,iBACA,SAAS,cACT,sBACA,6BACE,SACF,uBAAuB,OAAO,QAAQ,YAAY;EAChD,QAAQ,kBAAkB,OAAO,QAAQ,YAAY;;;;;EAKvD,aAAa,uBACX,OACA,QACA,YACA;;;;;;;;;;;KAaQ,kBACV,iBACA,SAAS,cACT,sBACA,6BACE,sBAAsB,OAAO,QAAQ,YAAY"}
|
package/build/modern/types.d.ts
CHANGED
|
@@ -1,53 +1,279 @@
|
|
|
1
1
|
import { DefaultError, DefinedInfiniteQueryObserverResult, DefinedQueryObserverResult, DistributiveOmit, InfiniteData, InfiniteQueryExecuteOptions, InfiniteQueryObserverOptions, InfiniteQueryObserverResult, MutateFunction, MutationObserverOptions, MutationObserverResult, OmitKeyof, Override, QueryExecuteOptions, QueryKey, QueryObserverOptions, QueryObserverResult, SkipToken } from "@tanstack/query-core";
|
|
2
2
|
//#region src/types.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* {@link UseBaseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
5
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
6
|
+
*/
|
|
3
7
|
type AnyUseBaseQueryOptions = UseBaseQueryOptions<any, any, any, any, any>;
|
|
8
|
+
/**
|
|
9
|
+
* The options shared by `useQuery` and `useSuspenseQuery`. Extends {@link QueryObserverOptions} from
|
|
10
|
+
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option.
|
|
11
|
+
*
|
|
12
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
13
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
14
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
15
|
+
* `select` is used.
|
|
16
|
+
* @template TQueryData - The type of the data actually held in the query cache — the input to `select` and
|
|
17
|
+
* `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.
|
|
18
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
19
|
+
*/
|
|
4
20
|
interface UseBaseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends QueryObserverOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> {
|
|
5
21
|
/**
|
|
6
22
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
7
|
-
*
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue true
|
|
8
25
|
*/
|
|
9
26
|
subscribed?: boolean;
|
|
10
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* The options accepted by `usePrefetchQuery` — everything you can pass to `queryClient.query`, except `queryFn`
|
|
30
|
+
* is required unless a default query function has been defined.
|
|
31
|
+
*
|
|
32
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
33
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
34
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
35
|
+
* `select` is used.
|
|
36
|
+
* @template TQueryData - The type of the data actually held in the query cache — the input to `select` and
|
|
37
|
+
* `placeholderData`. Defaults to, and is usually the same as, `TQueryFnData`.
|
|
38
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
39
|
+
*/
|
|
11
40
|
type UsePrefetchQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = DistributiveOmit<QueryExecuteOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>, 'queryFn'> & {
|
|
41
|
+
/**
|
|
42
|
+
* `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,
|
|
43
|
+
* unless a default query function has been defined.
|
|
44
|
+
*/
|
|
12
45
|
queryFn?: Exclude<QueryExecuteOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>['queryFn'], SkipToken>;
|
|
13
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* The options accepted by `usePrefetchInfiniteQuery` — everything you can pass to `queryClient.infiniteQuery`,
|
|
49
|
+
* except `queryFn` is required unless a default query function has been defined.
|
|
50
|
+
*
|
|
51
|
+
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
52
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
53
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` (a single page)
|
|
54
|
+
* here, since a prefetch never reads `data` back out — this parameter only matters if you reuse these options
|
|
55
|
+
* elsewhere with `select` applied.
|
|
56
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
57
|
+
* @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
|
|
58
|
+
*/
|
|
14
59
|
type UsePrefetchInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> = DistributiveOmit<InfiniteQueryExecuteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn'> & {
|
|
60
|
+
/**
|
|
61
|
+
* `skipToken` is not allowed as a value here — a prefetch always needs a query function to actually run,
|
|
62
|
+
* unless a default query function has been defined.
|
|
63
|
+
*/
|
|
15
64
|
queryFn?: Exclude<InfiniteQueryExecuteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
|
|
16
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* {@link UseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
68
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
69
|
+
*/
|
|
17
70
|
type AnyUseQueryOptions = UseQueryOptions<any, any, any, any>;
|
|
71
|
+
/**
|
|
72
|
+
* The options accepted by `useQuery`. Same as {@link UseBaseQueryOptions}, minus `suspense` (which
|
|
73
|
+
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
74
|
+
*
|
|
75
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
76
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
77
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
78
|
+
* `select` is used.
|
|
79
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
80
|
+
*/
|
|
18
81
|
interface UseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseBaseQueryOptions<TQueryFnData, TError, TData, TQueryFnData, TQueryKey>, 'suspense'> {}
|
|
82
|
+
/**
|
|
83
|
+
* {@link UseSuspenseQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
84
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
85
|
+
*/
|
|
19
86
|
type AnyUseSuspenseQueryOptions = UseSuspenseQueryOptions<any, any, any, any>;
|
|
87
|
+
/**
|
|
88
|
+
* The options accepted by `useSuspenseQuery`. Same as {@link UseQueryOptions}, minus `enabled`, `throwOnError`,
|
|
89
|
+
* and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so those options
|
|
90
|
+
* don't apply.
|
|
91
|
+
*
|
|
92
|
+
* @template TQueryFnData - The type your `queryFn` resolves to.
|
|
93
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
94
|
+
* @template TData - The type `data` ends up as after `select` runs. Defaults to `TQueryFnData` when no
|
|
95
|
+
* `select` is used.
|
|
96
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
97
|
+
*/
|
|
20
98
|
interface UseSuspenseQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> extends OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
|
99
|
+
/**
|
|
100
|
+
* `skipToken` is not allowed here — Suspense hooks cannot render a "disabled" state, so a query function
|
|
101
|
+
* must always be provided, unless a default query function has been defined.
|
|
102
|
+
*/
|
|
21
103
|
queryFn?: Exclude<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'], SkipToken>;
|
|
22
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* {@link UseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
107
|
+
* relevant, e.g. when accepting options for any query in a helper function.
|
|
108
|
+
*/
|
|
23
109
|
type AnyUseInfiniteQueryOptions = UseInfiniteQueryOptions<any, any, any, any, any>;
|
|
110
|
+
/**
|
|
111
|
+
* The options accepted by `useInfiniteQuery`. Extends {@link InfiniteQueryObserverOptions} from
|
|
112
|
+
* `@tanstack/query-core` with the `preact-query`-specific `subscribed` option, minus `suspense` (which
|
|
113
|
+
* `preact-query` derives from which hook you call rather than exposing as an option).
|
|
114
|
+
*
|
|
115
|
+
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
116
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
117
|
+
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
118
|
+
* the shape of all fetched pages plus their page params.
|
|
119
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
120
|
+
* @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
|
|
121
|
+
*/
|
|
24
122
|
interface UseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'suspense'> {
|
|
25
123
|
/**
|
|
26
124
|
* Set this to `false` to unsubscribe this observer from updates to the query cache.
|
|
27
|
-
*
|
|
125
|
+
*
|
|
126
|
+
* @defaultValue true
|
|
28
127
|
*/
|
|
29
128
|
subscribed?: boolean;
|
|
30
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* {@link UseSuspenseInfiniteQueryOptions} with all type parameters set to `any`, useful when the specific types
|
|
132
|
+
* aren't relevant, e.g. when accepting options for any query in a helper function.
|
|
133
|
+
*/
|
|
31
134
|
type AnyUseSuspenseInfiniteQueryOptions = UseSuspenseInfiniteQueryOptions<any, any, any, any, any>;
|
|
135
|
+
/**
|
|
136
|
+
* The options accepted by `useSuspenseInfiniteQuery`. Same as {@link UseInfiniteQueryOptions}, minus `enabled`,
|
|
137
|
+
* `throwOnError`, and `placeholderData` — Suspense hooks cannot render a "disabled" or "placeholder" state, so
|
|
138
|
+
* those options don't apply.
|
|
139
|
+
*
|
|
140
|
+
* @template TQueryFnData - The type of a single page, as your `queryFn` resolves it.
|
|
141
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
142
|
+
* @template TData - The type `data` ends up as after `select` runs — defaults to `InfiniteData<TQueryFnData>`,
|
|
143
|
+
* the shape of all fetched pages plus their page params.
|
|
144
|
+
* @template TQueryKey - The type of your `queryKey`.
|
|
145
|
+
* @template TPageParam - The type of the parameter passed to `queryFn` to fetch a given page.
|
|
146
|
+
*/
|
|
32
147
|
interface UseSuspenseInfiniteQueryOptions<TQueryFnData = unknown, TError = DefaultError, TData = InfiniteData<TQueryFnData>, TQueryKey extends QueryKey = QueryKey, TPageParam = unknown> extends OmitKeyof<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'> {
|
|
148
|
+
/**
|
|
149
|
+
* `skipToken` is not allowed here — Suspense hooks cannot render a "disabled" state, so a query function
|
|
150
|
+
* must always be provided, unless a default query function has been defined.
|
|
151
|
+
*/
|
|
33
152
|
queryFn?: Exclude<UseInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>['queryFn'], SkipToken>;
|
|
34
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* The result of `useQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
156
|
+
* `pending`. Re-exports {@link QueryObserverResult} from `@tanstack/query-core`. `useInfiniteQuery` returns
|
|
157
|
+
* {@link UseInfiniteQueryResult} instead.
|
|
158
|
+
*
|
|
159
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
160
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
161
|
+
*/
|
|
35
162
|
type UseBaseQueryResult<TData = unknown, TError = DefaultError> = QueryObserverResult<TData, TError>;
|
|
163
|
+
/**
|
|
164
|
+
* The result of `useQuery`. Same as {@link UseBaseQueryResult}.
|
|
165
|
+
*
|
|
166
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
167
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
168
|
+
*/
|
|
36
169
|
type UseQueryResult<TData = unknown, TError = DefaultError> = UseBaseQueryResult<TData, TError>;
|
|
170
|
+
/**
|
|
171
|
+
* The result of `useSuspenseQuery`. Same as {@link DefinedUseQueryResult}, minus `isPlaceholderData` — always
|
|
172
|
+
* `false` on that type, so this drops the dead field rather than an active state.
|
|
173
|
+
*
|
|
174
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
175
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
176
|
+
*/
|
|
37
177
|
type UseSuspenseQueryResult<TData = unknown, TError = DefaultError> = DistributiveOmit<DefinedQueryObserverResult<TData, TError>, 'isPlaceholderData'>;
|
|
178
|
+
/**
|
|
179
|
+
* The result of `useQuery` when `initialData` is set, or of `useSuspenseQuery` before the `isPlaceholderData`
|
|
180
|
+
* omission — `data` is never `undefined`. Re-exports {@link DefinedQueryObserverResult} from
|
|
181
|
+
* `@tanstack/query-core`.
|
|
182
|
+
*
|
|
183
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
184
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
185
|
+
*/
|
|
38
186
|
type DefinedUseQueryResult<TData = unknown, TError = DefaultError> = DefinedQueryObserverResult<TData, TError>;
|
|
187
|
+
/**
|
|
188
|
+
* The result of `useInfiniteQuery` when `initialData` isn't set — `data` may be `undefined` while the query is
|
|
189
|
+
* `pending`. Re-exports {@link InfiniteQueryObserverResult} from `@tanstack/query-core`.
|
|
190
|
+
*
|
|
191
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
192
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
193
|
+
*/
|
|
39
194
|
type UseInfiniteQueryResult<TData = unknown, TError = DefaultError> = InfiniteQueryObserverResult<TData, TError>;
|
|
195
|
+
/**
|
|
196
|
+
* The result of `useInfiniteQuery` when `initialData` is set — `data` is never `undefined`. Re-exports
|
|
197
|
+
* {@link DefinedInfiniteQueryObserverResult} from `@tanstack/query-core`.
|
|
198
|
+
*
|
|
199
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
200
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
201
|
+
*/
|
|
40
202
|
type DefinedUseInfiniteQueryResult<TData = unknown, TError = DefaultError> = DefinedInfiniteQueryObserverResult<TData, TError>;
|
|
203
|
+
/**
|
|
204
|
+
* The result of `useSuspenseInfiniteQuery`. Same as {@link DefinedUseInfiniteQueryResult}, minus
|
|
205
|
+
* `isPlaceholderData` — Suspense hooks never render placeholder data.
|
|
206
|
+
*
|
|
207
|
+
* @template TData - The type `data` ends up as after `select` runs.
|
|
208
|
+
* @template TError - The type of errors your `queryFn` may throw.
|
|
209
|
+
*/
|
|
41
210
|
type UseSuspenseInfiniteQueryResult<TData = unknown, TError = DefaultError> = OmitKeyof<DefinedInfiniteQueryObserverResult<TData, TError>, 'isPlaceholderData'>;
|
|
211
|
+
/**
|
|
212
|
+
* {@link UseMutationOptions} with all type parameters set to `any`, useful when the specific types aren't
|
|
213
|
+
* relevant, e.g. when accepting options for any mutation in a helper function.
|
|
214
|
+
*/
|
|
42
215
|
type AnyUseMutationOptions = UseMutationOptions<any, any, any, any>;
|
|
216
|
+
/**
|
|
217
|
+
* The options accepted by `useMutation`. Same as {@link MutationObserverOptions} from `@tanstack/query-core`,
|
|
218
|
+
* minus the internal `_defaulted` flag.
|
|
219
|
+
*
|
|
220
|
+
* @template TData - The type your mutation function resolves to.
|
|
221
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
222
|
+
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
223
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
224
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
225
|
+
*/
|
|
43
226
|
interface UseMutationOptions<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> extends OmitKeyof<MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, '_defaulted'> {}
|
|
227
|
+
/**
|
|
228
|
+
* The type of `mutate`, as returned by `useMutation`. Forwards the variables (and an optional per-call
|
|
229
|
+
* `onSuccess`/`onError`/`onSettled`) to the underlying `mutate` call. Fire-and-forget — errors are surfaced
|
|
230
|
+
* through the mutation result, not thrown.
|
|
231
|
+
*
|
|
232
|
+
* @template TData - The type your mutation function resolves to.
|
|
233
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
234
|
+
* @template TVariables - The type of the variable passed to `mutate`.
|
|
235
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
236
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
237
|
+
*/
|
|
44
238
|
type UseMutateFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = (...args: Parameters<MutateFunction<TData, TError, TVariables, TOnMutateResult>>) => void;
|
|
239
|
+
/**
|
|
240
|
+
* The type of `mutateAsync`, as returned by `useMutation`. Similar to {@link UseMutateFunction}, but returns a
|
|
241
|
+
* promise which can be awaited.
|
|
242
|
+
*
|
|
243
|
+
* @template TData - The type your mutation function resolves to.
|
|
244
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
245
|
+
* @template TVariables - The type of the variable passed to `mutateAsync`.
|
|
246
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
247
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
248
|
+
*/
|
|
45
249
|
type UseMutateAsyncFunction<TData = unknown, TError = DefaultError, TVariables = void, TOnMutateResult = unknown> = MutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
|
250
|
+
/**
|
|
251
|
+
* The result of `useMutation`. Same as {@link MutationObserverResult} from `@tanstack/query-core`, with
|
|
252
|
+
* `mutate` narrowed to the fire-and-forget {@link UseMutateFunction} signature, plus the added `mutateAsync`.
|
|
253
|
+
*
|
|
254
|
+
* @template TData - The type your mutation function resolves to.
|
|
255
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
256
|
+
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
257
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
258
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
259
|
+
*/
|
|
46
260
|
type UseBaseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = Override<MutationObserverResult<TData, TError, TVariables, TOnMutateResult>, {
|
|
47
261
|
mutate: UseMutateFunction<TData, TError, TVariables, TOnMutateResult>;
|
|
48
262
|
}> & {
|
|
263
|
+
/**
|
|
264
|
+
* Similar to `mutate`, but returns a promise which can be awaited.
|
|
265
|
+
*/
|
|
49
266
|
mutateAsync: UseMutateAsyncFunction<TData, TError, TVariables, TOnMutateResult>;
|
|
50
267
|
};
|
|
268
|
+
/**
|
|
269
|
+
* The result of `useMutation`. Same as {@link UseBaseMutationResult}.
|
|
270
|
+
*
|
|
271
|
+
* @template TData - The type your mutation function resolves to.
|
|
272
|
+
* @template TError - The type of errors your mutation function may throw.
|
|
273
|
+
* @template TVariables - The type of the variable passed to `mutate`/`mutateAsync`.
|
|
274
|
+
* @template TOnMutateResult - The type returned by `onMutate`, passed to `onSuccess`/`onError`/`onSettled` as
|
|
275
|
+
* their `onMutateResult` parameter — useful for optimistic-update rollback data.
|
|
276
|
+
*/
|
|
51
277
|
type UseMutationResult<TData = unknown, TError = DefaultError, TVariables = unknown, TOnMutateResult = unknown> = UseBaseMutationResult<TData, TError, TVariables, TOnMutateResult>;
|
|
52
278
|
//#endregion
|
|
53
279
|
export { AnyUseBaseQueryOptions, AnyUseInfiniteQueryOptions, AnyUseMutationOptions, AnyUseQueryOptions, AnyUseSuspenseInfiniteQueryOptions, AnyUseSuspenseQueryOptions, DefinedUseInfiniteQueryResult, DefinedUseQueryResult, UseBaseMutationResult, UseBaseQueryOptions, UseBaseQueryResult, UseInfiniteQueryOptions, UseInfiniteQueryResult, UseMutateAsyncFunction, UseMutateFunction, UseMutationOptions, UseMutationResult, UsePrefetchInfiniteQueryOptions, UsePrefetchQueryOptions, UseQueryOptions, UseQueryResult, UseSuspenseInfiniteQueryOptions, UseSuspenseInfiniteQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;KA0BY,yBAAyB;;;;;;;;;;;;;UAmBpB,oBACf,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,kBACrB,qBACR,cACA,QACA,OACA,YACA;;;;;;EAOA;;;;;;;;;;;;;;KAeU,wBACV,wBACA,SAAS,cACT,QAAQ,cACR,aAAa,cACb,kBAAkB,WAAW,YAC3B,iBACF,oBAAoB,cAAc,QAAQ,OAAO,YAAY;;;;;EAO7D,UAAU,QACR,oBACE,cACA,QACA,OACA,cACA,uBAEF;;;;;;;;;;;;;;KAgBQ,gCACV,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,UAC7B,wBACE,iBACF,4BACE,cACA,QACA,OACA,WACA;;;;;EAQF,UAAU,QACR,4BACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;KAQQ,qBAAqB;;;;;;;;;;;UAWhB,gBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,oBAAoB,cAAc,QAAQ,OAAO,cAAc;;;;;KAQrD,6BAA6B;;;;;;;;;;;;UAiBxB,wBACf,wBACA,SAAS,cACT,QAAQ,cACR,kBAAkB,WAAW,kBACrB,UACR,gBAAgB,cAAc,QAAQ,OAAO;;;;;EAO7C,UAAU,QACR,gBAAgB,cAAc,QAAQ,OAAO,uBAC7C;;;;;;KAQQ,6BAA6B;;;;;;;;;;;;;UAmBxB,wBACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,6BACE,cACA,QACA,OACA,WACA;;;;;;EASF;;;;;;KAOU,qCACV;;;;;;;;;;;;;UAae,gCACf,wBACA,SAAS,cACT,QAAQ,aAAa,eACrB,kBAAkB,WAAW,UAC7B,8BACQ,UACR,wBAAwB,cAAc,QAAQ,OAAO,WAAW;;;;;EAOhE,UAAU,QACR,wBACE,cACA,QACA,OACA,WACA,wBAEF;;;;;;;;;;KAYQ,mBACV,iBACA,SAAS,gBACP,oBAAoB,OAAO;;;;;;;KAQnB,eACV,iBACA,SAAS,gBACP,mBAAmB,OAAO;;;;;;;;KASlB,uBACV,iBACA,SAAS,gBACP,iBACF,2BAA2B,OAAO;;;;;;;;;KAYxB,sBACV,iBACA,SAAS,gBACP,2BAA2B,OAAO;;;;;;;;KAS1B,uBACV,iBACA,SAAS,gBACP,4BAA4B,OAAO;;;;;;;;KAS3B,8BACV,iBACA,SAAS,gBACP,mCAAmC,OAAO;;;;;;;;KASlC,+BACV,iBACA,SAAS,gBACP,UACF,mCAAmC,OAAO;;;;;KAQhC,wBAAwB;;;;;;;;;;;UAWnB,mBACf,iBACA,SAAS,cACT,mBACA,mCACQ,UACR,wBAAwB,OAAO,QAAQ,YAAY;;;;;;;;;;;;KAezC,kBACV,iBACA,SAAS,cACT,mBACA,iCAEG,MAAM,WACP,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;;KAclC,uBACV,iBACA,SAAS,cACT,mBACA,6BACE,eAAe,OAAO,QAAQ,YAAY;;;;;;;;;;;KAYlC,sBACV,iBACA,SAAS,cACT,sBACA,6BACE,SACF,uBAAuB,OAAO,QAAQ,YAAY;EAChD,QAAQ,kBAAkB,OAAO,QAAQ,YAAY;;;;;EAKvD,aAAa,uBACX,OACA,QACA,YACA;;;;;;;;;;;KAaQ,kBACV,iBACA,SAAS,cACT,sBACA,6BACE,sBAAsB,OAAO,QAAQ,YAAY"}
|