Module: @ts-rest/react-query
Interfaces
Type Aliases
DataResponse
Ƭ DataResponse<TAppRoute
>: ClientInferResponses
<TAppRoute
, SuccessfulHttpStatusCode
, "force"
>
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
Defined in
react-query/src/v4/types.ts:24
ErrorResponse
Ƭ ErrorResponse<TAppRoute
, TIncludeThrownErrors
>: ClientInferResponses
<TAppRoute
, ErrorHttpStatusCode
, "ignore"
> | TIncludeThrownErrors
extends true
? Error
: never
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TIncludeThrownErrors | extends boolean | undefined = false |
Defined in
react-query/src/v4/types.ts:31
InitClientReturn
Ƭ InitClientReturn<T
, TClientArgs
>: UseTsRestQueryClient
<T
, TClientArgs
>
Deprecated
Use TsRestReactQueryClient
instead
Type parameters
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ReactQueryClientArgs |
Defined in
react-query/src/v4/react-query.ts:157
TsRestReactQueryClient
Ƭ TsRestReactQueryClient<T
, TClientArgs
>: { [TKey in keyof T]: T[TKey] extends AppRoute ? Without<AppRouteFunctions<T[TKey], TClientArgs>, never> : T[TKey] extends AppRouter ? TsRestReactQueryClient<T[TKey], TClientArgs> : never }
Type parameters
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ReactQueryClientArgs |
Defined in
react-query/src/v4/react-query.ts:162
UseInfiniteQueryOptions
Ƭ UseInfiniteQueryOptions<TAppRoute
, TData
, TIncludeThrownErrors
>: TanStackUseInfiniteQueryOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
, TIncludeThrownErrors
>, TData
>
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
TIncludeThrownErrors | extends boolean | undefined = false |
Defined in
react-query/src/v4/types.ts:57
UseInfiniteQueryResult
Ƭ UseInfiniteQueryResult<TAppRoute
, TData
, TIncludeThrownErrors
>: TanStackUseInfiniteQueryResult
<TData
, ErrorResponse
<TAppRoute
, TIncludeThrownErrors
>>
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
TIncludeThrownErrors | extends boolean | undefined = false |
Defined in
react-query/src/v4/types.ts:67
UseMutationOptions
Ƭ UseMutationOptions<TAppRoute
, TClientArgsOrClient
, TClientArgs
>: TanStackUseMutationOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
, TClientArgs
["includeThrownErrorsInErrorType"
]>, PartialClientInferRequest
<TAppRoute
, TClientArgs
>, unknown
>
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TClientArgsOrClient | extends ReactQueryClientArgs | TsRestReactQueryClient <any , any > |
TClientArgs | extends ReactQueryClientArgs = GetClientArgs <TClientArgsOrClient > |
Defined in
react-query/src/v4/types.ts:91
UseMutationResult
Ƭ UseMutationResult<TAppRoute
, TClientArgsOrClient
, TClientArgs
>: TanStackUseMutationResult
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
, TClientArgs
["includeThrownErrorsInErrorType"
]>, PartialClientInferRequest
<TAppRoute
, TClientArgs
>, unknown
>
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TClientArgsOrClient | extends ReactQueryClientArgs | TsRestReactQueryClient <any , any > |
TClientArgs | extends ReactQueryClientArgs = GetClientArgs <TClientArgsOrClient > |
Defined in
react-query/src/v4/types.ts:104
UseQueryOptions
Ƭ UseQueryOptions<TAppRoute
, TData
, TIncludeThrownErrors
>: TanStackUseQueryOptions
<DataResponse
<TAppRoute
>, ErrorResponse
<TAppRoute
, TIncludeThrownErrors
>, TData
>
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
TIncludeThrownErrors | extends boolean | undefined = false |
Defined in
react-query/src/v4/types.ts:38
UseQueryResult
Ƭ UseQueryResult<TAppRoute
, TData
, TIncludeThrownErrors
>: TanStackUseQueryResult
<TData
, ErrorResponse
<TAppRoute
, TIncludeThrownErrors
>>
Type parameters
Name | Type |
---|---|
TAppRoute | extends AppRoute |
TData | DataResponse <TAppRoute > |
TIncludeThrownErrors | extends boolean | undefined = false |
Defined in
react-query/src/v4/types.ts:48
UseTsRestQueryClient
Ƭ UseTsRestQueryClient<T
, TClientArgs
>: { [TKey in keyof T]: T[TKey] extends AppRoute ? Without<AppRouteFunctionsWithQueryClient<T[TKey], TClientArgs>, never> : T[TKey] extends AppRouter ? UseTsRestQueryClient<T[TKey], TClientArgs> : never }
Type parameters
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ReactQueryClientArgs |
Defined in
react-query/src/v4/react-query.ts:333
Functions
initQueryClient
▸ initQueryClient<T
, TClientArgs
>(router
, clientArgs
): TsRestReactQueryClient
<T
, TClientArgs
>
Type parameters
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ReactQueryClientArgs |
Parameters
Name | Type |
---|---|
router | T |
clientArgs | TClientArgs |
Returns
TsRestReactQueryClient
<T
, TClientArgs
>
Defined in
react-query/src/v4/react-query.ts:175
useTsRestQueryClient
▸ useTsRestQueryClient<T
, TClientArgs
>(client
): UseTsRestQueryClient
<T
, TClientArgs
>
Type parameters
Name | Type |
---|---|
T | extends AppRouter |
TClientArgs | extends ReactQueryClientArgs |
Parameters
Name | Type |
---|---|
client | TsRestReactQueryClient <T , TClientArgs > |
Returns
UseTsRestQueryClient
<T
, TClientArgs
>
Defined in
react-query/src/v4/react-query.ts:344