Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Latest
interface LiteralSchema
import { type LiteralSchema } from "https://deno.land/x/valibot@1.0.0-beta.0-to-json-schema/src/schemas/literal/literal.ts";

Literal schema type.

Type Parameters

TLiteral extends Literal
TMessage extends ErrorMessage<LiteralIssue> | undefined

Properties

readonly
type: "literal"

The schema type.

readonly
reference: literal

The schema reference.

readonly
literal: TLiteral

The literal value.

readonly
message: TMessage

The error message.