MCPcopy
hub / github.com/colinhacks/zod / union

Function union

packages/zod/src/v4/classic/schemas.ts:1561–1570  ·  view source on GitHub ↗
(
  options: T,
  params?: string | core.$ZodUnionParams
)

Source from the content-addressed store, hash-verified

1559});
1560
1561export 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
1573export interface ZodXor<T extends readonly core.SomeType[] = readonly core.$ZodType[]>

Callers 2

orFunction · 0.70
jsonFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected