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
>: TanStackUseInfiniteQueryOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
Defined in​
lib/types.ts:42
UseInfiniteQueryResult​
Ƭ UseInfiniteQueryResult<TAppRoute
>: TanStackUseInfiniteQueryResult
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
Defined in​
lib/types.ts:48
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:59
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:73
UseQueryOptions​
Ƭ UseQueryOptions<TAppRoute
>: TanStackUseQueryOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
Defined in​
lib/types.ts:34
UseQueryResult​
Ƭ UseQueryResult<TAppRoute
>: TanStackUseQueryResult
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
>>
Type parameters​
Name | Type |
---|---|
TAppRoute | extends AppRoute |
Defined in​
lib/types.ts:37
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