UnionA union of multiple representations.
Details
types are the union members. mode controls JSON Schema output as either
"anyOf" (the default) or mutually exclusive "oneOf".
models
Source effect/SchemaRepresentation.ts:4346 lines
export interface Union {
readonly Union._tag: "Union"_tag: "Union"
readonly Union.annotations?: anyannotations?: import SchemaSchema.declareAnnotations.type Schema.Annotations.Annotations = /*unresolved*/ anyAnnotations | undefined
readonly Union.types: ReadonlyArray<Representation>types: interface ReadonlyArray<T>ReadonlyArray<type Representation =
| Declaration
| Reference
| Suspend
| Null
| Undefined
| Void
| Never
| Unknown
| Any
| String
| Number
| Boolean
| BigInt
| Symbol
| Literal
| UniqueSymbol
| ObjectKeyword
| Enum
| TemplateLiteral
| Arrays
| Objects
| Union
The core tagged union of all supported schema shapes.
Details
Each variant has a _tag discriminator. Switch on _tag to handle each
shape. Most variants carry optional annotations and some carry checks
for validation constraints.
Representation>
readonly Union.mode: "anyOf" | "oneOf"mode: "anyOf" | "oneOf"
}Referenced by 1 symbols