Skip to main content
Module

x/cav/mod.ts>Parser

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

An object or function responsible for parsing data or throwing errors if the data isn't shaped as expected. These can either be functions with a single data argument that return the parsed data or an object with a parse(data): unknown function that does the same. Parsers can be asynchronous.

Type Parameters

optional
I = any
optional
O = any
definition: (ParserFunction<I, O> | ParserObject<I, O>)