Function
union
(
options: T,
params?: string | core.$ZodUnionParams
)
Source from the content-addressed store, hash-verified
| 1559 | }); |
| 1560 | |
| 1561 | export function union<const T extends readonly core.SomeType[]>( |
| 1562 | options: T, |
| 1563 | params?: string | core.$ZodUnionParams |
| 1564 | ): ZodUnion<T> { |
| 1565 | return new ZodUnion({ |
| 1566 | type: "union", |
| 1567 | options: options as any as core.$ZodType[], |
| 1568 | ...util.normalizeParams(params), |
| 1569 | }) as any; |
| 1570 | } |
| 1571 | |
| 1572 | // ZodXor |
| 1573 | export interface ZodXor<T extends readonly core.SomeType[] = readonly core.$ZodType[]> |
Tested by
no test coverage detected