Skip to main content
Module

x/cav/endpoint.ts>Endpoint

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

Cav Endpoint handler, for responding to requests.

Type Parameters

Schema extends EndpointSchema | null
definition: (Schema extends null ? { } : Schema) & ((req: EndpointRequest<{ socket?: false; query: (Schema extends { query: Parser; } ? ParserInput<Schema["query"]> : QueryRecord | undefined); body: (Schema extends { body: Parser; } ? ParserInput<Schema["body"]> : undefined); result: (Schema extends { resolve: (...a: any[]) => infer R; } ? Awaited<R> : undefined); }>, conn: http.ConnInfo) => Promise<Response>)