Spaces:
Paused
Paused
Download frontend/node_modules/@tanstack/react-query/src/useQuery.ts from AUXteam/UX-agent: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/spaces/AUXteam/UX-agent/resolve/main/frontend/node_modules/%40tanstack/react-query/src/useQuery.ts
- Command line
-
hf download hf://spaces/AUXteam/UX-agent/frontend/node_modules/@tanstack/react-query/src/useQuery.ts
-
curl -L -o useQuery.ts https://huggingface.co/spaces/AUXteam/UX-agent/resolve/main/frontend/node_modules/%40tanstack/react-query/src/useQuery.ts
1.43 kB
| 'use client' | |
| import { QueryObserver } from '@tanstack/query-core' | |
| import { useBaseQuery } from './useBaseQuery' | |
| import type { | |
| DefaultError, | |
| NoInfer, | |
| QueryClient, | |
| QueryKey, | |
| } from '@tanstack/query-core' | |
| import type { | |
| DefinedUseQueryResult, | |
| UseQueryOptions, | |
| UseQueryResult, | |
| } from './types' | |
| import type { | |
| DefinedInitialDataOptions, | |
| UndefinedInitialDataOptions, | |
| } from './queryOptions' | |
| export function useQuery< | |
| TQueryFnData = unknown, | |
| TError = DefaultError, | |
| TData = TQueryFnData, | |
| TQueryKey extends QueryKey = QueryKey, | |
| >( | |
| options: DefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, | |
| queryClient?: QueryClient, | |
| ): DefinedUseQueryResult<NoInfer<TData>, TError> | |
| export function useQuery< | |
| TQueryFnData = unknown, | |
| TError = DefaultError, | |
| TData = TQueryFnData, | |
| TQueryKey extends QueryKey = QueryKey, | |
| >( | |
| options: UndefinedInitialDataOptions<TQueryFnData, TError, TData, TQueryKey>, | |
| queryClient?: QueryClient, | |
| ): UseQueryResult<NoInfer<TData>, TError> | |
| export function useQuery< | |
| TQueryFnData = unknown, | |
| TError = DefaultError, | |
| TData = TQueryFnData, | |
| TQueryKey extends QueryKey = QueryKey, | |
| >( | |
| options: UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, | |
| queryClient?: QueryClient, | |
| ): UseQueryResult<NoInfer<TData>, TError> | |
| export function useQuery(options: UseQueryOptions, queryClient?: QueryClient) { | |
| return useBaseQuery(options, QueryObserver, queryClient) | |
| } | |