Skip to main content
Module

x/cav/parser.ts

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

Functions

Normalizes a Parser into a ParserFunction.

Interfaces

A function that parses data. If data is not shaped as expected, an error should be thrown.

An object with a ParserFunction as its "parse" property. Zod compatible.

Type Aliases

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.

Extracts the input type of a given Parser.

Extracts the output type of a given Parser.