@webroute/clientType aliases
TypedClient
TypedClient<
TApp
,TFetcher
>: <TKey
>(key
) =>TApp
[TKey
] extends infer TEndpoint ?TFetcher
extendsFetcher
<infer TOpts, infer TResponse> ? (config
, ...args
) =>Promise
<FetcherReturn
<TEndpoint
["Output"
],TResponse
>> :never
:never
Type Parameters
Type Parameters
Type Parameter |
---|
TKey extends keyof TApp & string |
Parameters
Parameter | Type |
---|---|
key | TKey |
Returns
TApp
[TKey
] extends infer TEndpoint ? TFetcher
extends Fetcher
<infer TOpts, infer TResponse> ? (config
, ...args
) => Promise
<FetcherReturn
<TEndpoint
["Output"
], TResponse
>> : never
: never