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

x/valibot/mod.ts>VariantSchemaAsync

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
interface VariantSchemaAsync
implements BaseSchemaAsync<Input<TOptions[number]>, TOutput>
import { type VariantSchemaAsync } from "https://deno.land/x/valibot@v0.30.0/mod.ts";

Variant schema async type.

Type Parameters

TKey extends string
TOptions extends VariantOptionsAsync<TKey>
optional
TOutput = Output<TOptions[number]>

Properties

type: "variant"

The schema type.

key: TKey

The discriminator key.

options: TOptions

The variant options.

message: ErrorMessage | undefined

The error message.

pipe: PipeAsync<Input<TOptions[number]>> | undefined

The validation and transformation pipeline.