Skip to main content
Module

x/valita/mod.ts>union

A typesafe validation & parsing library for TypeScript.
Go to Latest
function union
import { union } from "https://deno.land/x/valita@v0.3.5/mod.ts";

Create a validator that matches any type T1 | T2 | ... | Tn, where T1, T2, ..., Tn are the output types of the given subvalidators.

This is analogous to how TypeScript's union types are constructed.

Parameters

...options: T