UNPKG

@suspensive/react-query-4

Version:

Suspensive interfaces for @tanstack/react-query@4

28 lines (27 loc) 1.88 kB
import { OmitKeyof, QueryKey, UseQueryOptions, WithRequired, queryOptions as queryOptions$1 } from "@tanstack/react-query"; //#region src/queryOptions.d.ts /** * @deprecated There is no `SelectedQueryOptions` in \@tanstack/react-query@^4.40.0. */ type SelectedQueryOptions<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = WithRequired<OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'getNextPageParam' | 'getPreviousPageParam' | 'queryKeyHashFn' | '_defaulted' | 'behavior' | 'structuralSharing' | 'isDataEqual' | 'onSuccess' | 'onError' | 'onSettled' | 'enabled' | 'refetchInterval' | 'initialData' | 'networkMode'>, 'queryKey' | 'queryFn'> & { select: (data: TQueryFnData) => TData; }; /** * @deprecated There is no `UnSelectedQueryOptions` in \@tanstack/react-query@^4.40.0. */ type UnSelectedQueryOptions<TQueryFnData = unknown, TError = unknown, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey> = WithRequired<OmitKeyof<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'getNextPageParam' | 'getPreviousPageParam' | 'queryKeyHashFn' | '_defaulted' | 'behavior' | 'structuralSharing' | 'isDataEqual' | 'onSuccess' | 'onError' | 'onSettled' | 'enabled' | 'refetchInterval' | 'initialData' | 'networkMode'>, 'queryKey' | 'queryFn'> & { select?: undefined; }; /** * This feature is officially supported in \@tanstack/react-query@^4.40.0, You can proceed with the migration. * @deprecated Use `queryOptions` from \@tanstack/react-query@^4.40.0 * @example * ```diff * - import { queryOptions } from '@suspensive/react-query' * + import { queryOptions } from '@tanstack/react-query' * ``` */ declare const queryOptions: typeof queryOptions$1; //#endregion export { SelectedQueryOptions, UnSelectedQueryOptions, queryOptions }; //# sourceMappingURL=queryOptions.d.cts.map