MCPcopy Create free account
hub / github.com/arktypeio/arktype / union

Function union

ark/sets/algebra.ts:25–26  ·  view source on GitHub ↗
(...schemas: Schema[])

Source from the content-addressed store, hash-verified

23
24/** the values any schema accepts, without the branches others subsume */
25export const union = (...schemas: Schema[]): Root =>
26 rootSchema(schemas.map(schema => parse(schema)) as never)
27
28export interface Discriminant {
29 path: readonly PropertyKey[]

Callers 2

typeKindOfMethod · 0.50
algebra.test.tsFile · 0.50

Calls 2

parseFunction · 0.90
mapMethod · 0.65

Tested by

no test coverage detected