Type Alias: QueryResult<TVarName, TData>
QueryResult<
TVarName,TData>:Omit<UseQueryResult<TData>,"data"> &{ [P in TVarName]: UseQueryResult<TData>["data"] }
See Tanstack Query - useQuery returns.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TVarName extends string | - | The name of the variable that returns the data. |
TData | unknown | The data returned. |
See
Tanstack Query - useQuery
Example
datais renamed according to theTVarNameand therefore not included in the result.
{
- data,
dataUpdatedAt,
error,
errorUpdatedAt,
failureCount,
failureReason,
fetchStatus,
isError,
isFetched,
isFetchedAfterMount,
isFetching,
isInitialLoading,
isLoading,
isLoadingError,
isPaused,
isPending,
isPlaceholderData,
isRefetchError,
isRefetching,
isStale,
isSuccess,
refetch,
status,
}