Skip to main content
Module

x/cav/mod.ts>Client

A server framework for Deno
Go to Latest
type alias Client
import { type Client } from "https://deno.land/x/cav@0.2.0-alpha.4/mod.ts";

Client function that wraps a fetch() process tailored for making requests to a Cav handler, complete with serialization and socket support.

Type Parameters

optional
T = null
definition: (T extends string ? ((x: ClientArg<Record<string, string | string[]> | undefined, never, false>) => Promise<[unknown, Response]>) : T extends Handler ? (Parameters<T>[0] extends RouterRequest<infer S> ? Client<S> : Parameters<T>[0] extends EndpointRequest<infer Q, infer M, infer R> ? ((x: ClientArg<Q, M, false>) => Promise<[R, Response]>) : Parameters<T>[0] extends SocketRequest<infer Q, infer S, infer R> ? ((x: ClientArg<Q, never, true>) => WS<R, S>) : UnknownClient) : T extends RouterShape ? UnionToIntersection<[K in keyof T]: ExpandPath<K, Client<T[K]>>[keyof T]> : T extends ClientType[] ? UnionToIntersection<Client<T[number]>> : UnknownClient)