Download react-query/packages/solid-query/src/QueryClient.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.45 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/packages/solid-query/src/QueryClient.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/packages/solid-query/src/QueryClient.ts
-
curl -L -o QueryClient.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/react-query/packages/solid-query/src/QueryClient.ts
2.45 kB
| import { QueryClient as QueryCoreClient } from '@tanstack/query-core' | |
| import type { | |
| DefaultOptions as CoreDefaultOptions, | |
| DefaultError, | |
| OmitKeyof, | |
| QueryClientConfig as QueryCoreClientConfig, | |
| InfiniteQueryObserverOptions as QueryCoreInfiniteQueryObserverOptions, | |
| QueryObserverOptions as QueryCoreObserverOptions, | |
| QueryKey, | |
| } from '@tanstack/query-core' | |
| export interface QueryObserverOptions< | |
| TQueryFnData = unknown, | |
| TError = DefaultError, | |
| TData = TQueryFnData, | |
| TQueryData = TQueryFnData, | |
| TQueryKey extends QueryKey = QueryKey, | |
| TPageParam = never, | |
| > extends OmitKeyof< | |
| QueryCoreObserverOptions< | |
| TQueryFnData, | |
| TError, | |
| TData, | |
| TQueryData, | |
| TQueryKey, | |
| TPageParam | |
| >, | |
| 'structuralSharing' | |
| > { | |
| /** | |
| * Set this to a reconciliation key to enable reconciliation between query results. | |
| * Set this to `false` to disable reconciliation between query results. | |
| * Set this to a function which accepts the old and new data and returns resolved data of the same type to implement custom reconciliation logic. | |
| * Defaults reconciliation to false. | |
| */ | |
| reconcile?: | |
| | string | |
| | false | |
| | ((oldData: TData | undefined, newData: TData) => TData) | |
| } | |
| export interface InfiniteQueryObserverOptions< | |
| TQueryFnData = unknown, | |
| TError = DefaultError, | |
| TData = TQueryFnData, | |
| TQueryKey extends QueryKey = QueryKey, | |
| TPageParam = unknown, | |
| > extends OmitKeyof< | |
| QueryCoreInfiniteQueryObserverOptions< | |
| TQueryFnData, | |
| TError, | |
| TData, | |
| TQueryKey, | |
| TPageParam | |
| >, | |
| 'structuralSharing' | |
| > { | |
| /** | |
| * Set this to a reconciliation key to enable reconciliation between query results. | |
| * Set this to `false` to disable reconciliation between query results. | |
| * Set this to a function which accepts the old and new data and returns resolved data of the same type to implement custom reconciliation logic. | |
| * Defaults reconciliation to false. | |
| */ | |
| reconcile?: | |
| | string | |
| | false | |
| | ((oldData: TData | undefined, newData: TData) => TData) | |
| } | |
| export interface DefaultOptions<TError = DefaultError> | |
| extends CoreDefaultOptions<TError> { | |
| queries?: OmitKeyof<QueryObserverOptions<unknown, TError>, 'queryKey'> | |
| } | |
| export interface QueryClientConfig extends QueryCoreClientConfig { | |
| defaultOptions?: DefaultOptions | |
| } | |
| export class QueryClient extends QueryCoreClient { | |
| constructor(config: QueryClientConfig = {}) { | |
| super(config) | |
| } | |
| } | |