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.
Type Parameters
T extends Type[]
Parameters
...options: T