Module: @ts-rest/react-query
Type Aliases​
DataResponse​
Ƭ DataResponse<TAppRoute
>: ClientInferResponses
<TAppRoute
, SuccessfulHttpStatusCode
, "force"
>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
Defined in​
lib/types.ts:21
ErrorResponse​
Ƭ ErrorResponse<TAppRoute
>: ClientInferResponses
<TAppRoute
, ErrorHttpStatusCode
, "ignore"
>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
Defined in​
lib/types.ts:28
InitClientReturn​
Ƭ InitClientReturn<T
, TClientArgs
>: { [TKey in keyof T]: T[TKey] extends AppRoute ? Without<AppRouteFunctions<T[TKey], TClientArgs>, never> : T[TKey] extends AppRouter ? InitClientReturn<T[TKey], TClientArgs> : never }
Type parameters​
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ClientArgs |
Defined in​
lib/react-query.ts:152
UseInfiniteQueryOptions​
Ƭ UseInfiniteQueryOptions<TAppRoute
, TData
>: TanStackUseInfiniteQueryOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>, TData
>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
Defined in​
lib/types.ts:48
UseInfiniteQueryResult​
Ƭ UseInfiniteQueryResult<TAppRoute
, TData
>: TanStackUseInfiniteQueryResult
<TData
, ErrorResponse
<TAppRoute
>>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
Defined in​
lib/types.ts:57
UseMutationOptions​
Ƭ UseMutationOptions<TAppRoute
, TClientArgsOrClient
>: TanStackUseMutationOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>, TClientArgsOrClient
extends ClientArgs
? PartialClientInferRequest
<TAppRoute
, TClientArgsOrClient
> : TClientArgsOrClient
extends InitClientReturn
<any
, any
> ? PartialClientInferRequest
<TAppRoute
, InferClientArgs
<TClientArgsOrClient
>> : never
, unknown
>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TClientArgsOrClient | extends ClientArgs | InitClientReturn <any , any > |
Defined in​
lib/types.ts:67
UseMutationResult​
Ƭ UseMutationResult<TAppRoute
, TClientArgsOrClient
>: TanStackUseMutationResult
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>, TClientArgsOrClient
extends ClientArgs
? PartialClientInferRequest
<TAppRoute
, TClientArgsOrClient
> : TClientArgsOrClient
extends InitClientReturn
<any
, any
> ? PartialClientInferRequest
<TAppRoute
, InferClientArgs
<TClientArgsOrClient
>> : never
, unknown
>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TClientArgsOrClient | extends ClientArgs | InitClientReturn <any , any > |
Defined in​
lib/types.ts:81
UseQueryOptions​
Ƭ UseQueryOptions<TAppRoute
, TData
>: TanStackUseQueryOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>, TData
>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
Defined in​
lib/types.ts:34
UseQueryResult​
Ƭ UseQueryResult<TAppRoute
, TData
>: TanStackUseQueryResult
<TData
, ErrorResponse
<TAppRoute
>>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
Defined in​
lib/types.ts:43
Functions​
initQueryClient​
â–¸ initQueryClient<T
, TClientArgs
>(router
, clientArgs
): InitClientReturn
<T
, TClientArgs
>
Type parameters​
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ClientArgs |
Parameters​
Name | Type |
---|---|
router | T |
clientArgs | TClientArgs |
Returns​
InitClientReturn
<T
, TClientArgs
>
Defined in​
lib/react-query.ts:165
useTsRestQueryClient​
â–¸ useTsRestQueryClient<T
, TClientArgs
>(client
): InitUseTsRestQueryClientReturn
<T
, TClientArgs
>
Type parameters​
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ClientArgs |
Parameters​
Name | Type |
---|---|
client | InitClientReturn <T , TClientArgs > |
Returns​
InitUseTsRestQueryClientReturn
<T
, TClientArgs
>
Defined in​
lib/react-query.ts:325