Skip to main content
Module

x/cav/mod.ts>Endpoint

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

Cav Endpoint handler, for responding to requests.

Type Parameters

optional
Schema extends { query?: ((x: any) => any) | null; message?: ((x: any) => any) | null; resolve?: ((x: any) => any) | null; } = { }
definition: Schema & ((req: EndpointRequest<(Schema["query"] extends Parser<infer Q> ? Q : Record<string, string | string[]>), (Schema["message"] extends Parser<infer M> ? M : undefined), (Schema["resolve"] extends (x: any) => Promise<infer R> | infer R ? R : undefined)>, conn: http.ConnInfo) => Promise<Response>)