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
• TVarName extends string
The name of the variable that returns the data.
• TData = unknown
The data returned.
See
Tanstack Query - useQuery
Example
data
is renamed according to theTVarName
and 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,
}