Skip to main content
Module

x/cav/client.ts>Client

A server framework for Deno
Go to Latest
type alias Client
import { type Client } from "https://deno.land/x/cav@0.2.3/client.ts";

Client function for making requests to a remote Cav handler. If the handler type is a Router or Endpoint, end-to-end type safety kicks in.

Type Parameters

optional
T = null
optional
Req = T extends Handler<infer R> ? R : null
definition: (Req extends RouterRequest<infer RS> & EndpointRequest<infer ES> ? (Client<Handler<RouterRequest<RS>>> & Client<Handler<EndpointRequest<ES>>>) : Req extends RouterRequest<infer RS> ? (RS extends RouterShape ? RouterClient<RS> : UnknownClient) : Req extends EndpointRequest<infer ES> ? (ES extends EndpointShape ? EndpointClient<ES> : UnknownClient) : UnknownClient)