$union
Callable
Type parameters
- Elements: ConstExpr<Node>[]
Parameters
union: Elements
The items in the union.
options: SchemaOptions<object, NoInfer<ToInfer<_TupleElements<{ [ K in string | number | symbol ]: Elements[K<K>] extends (...args: any[]) => R ? R : Elements[K<K>] }>>[number]>> = {}
Additional options to pass to the tuple.
Returns UnionType<TupleElements<Elements>>
Create a new
UnionType
instance with the given options.Example