Skip to main content
Module

x/valibot/src/schemas/union/unionAsync.ts>unionAsync

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

Creates an union schema.

Type Parameters

TOptions extends UnionOptionsAsync

Parameters

options: TOptions

The union options.

Returns

UnionSchemaAsync<TOptions, undefined>

An union schema.

Creates an union schema.

Type Parameters

TOptions extends UnionOptionsAsync
TMessage extends ErrorMessage<UnionIssue<InferIssue<TOptions[number]>>> | undefined

Parameters

options: TOptions

The union options.

message: TMessage

The error message.

Returns

UnionSchemaAsync<TOptions, TMessage>

An union schema.