Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/valibot/src/schemas/index.ts>literal

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
function literal
import { literal } from "https://deno.land/x/valibot@v0.22.0/src/schemas/index.ts";

Creates a literal schema.

Type Parameters

TLiteral extends Literal

Parameters

literal: TLiteral

The literal value.

optional
message: ErrorMessage = [UNSUPPORTED]

The error message.

Returns

LiteralSchema<TLiteral>

A literal schema.