Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

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

Creates an async literal schema.

Type Parameters

TLiteral extends string | number

Parameters

literal: TLiteral

The literal value.

optional
error: string

The error message.

Returns

An async literal schema.