Skip to main content
Module

x/cav/client.ts

A server framework for Deno
Go to Latest
import * as cav from "https://deno.land/x/cav@0.2.0-alpha.7/client.ts";

Functions

Creates a new Client function tied to a base URL, for triggering RPCs on a Cav server and deserializing the response. If the type parameter is a Cav Router or Endpoint, end-to-end type safety kicks in.

Interfaces

Arguments for the Client functions.

A server endpoint handler can use this Request type to ferry type information to the client about what argument types are acceptable and what the result will be into.

A server router handler can use this Request type to ferry type information to the client about what routes exist and what data they accept/return. The client uses the RouterShape to infer which property accesses are valid and what their response type will be.

The shape of a RouterRequest, mapping allowed routes to their handlers.

Type Aliases

Client function for making RPC requests to a Cav server.

The shape of an EndpointRequest, holding the type information needed to calculate the allowable ClientArgs.

Generic handler type for server-defined Request handlers.