DocumentA single Representation together with its named References.
When to use
Use when representing a single Schema AST together with its named references before reconstructing a runtime Schema, converting to JSON Schema, or wrapping it as a MultiDocument.
Source effect/SchemaRepresentation.ts:7044 lines
export type type Document = {
readonly representation: Representation
readonly references: References
}
A single
Representation
together with its named
References
.
When to use
Use when representing a single Schema AST together with its named references
before reconstructing a runtime Schema, converting to JSON Schema, or
wrapping it as a
MultiDocument
.
Document = {
readonly representation: Representationrepresentation: 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 references: Referencesreferences: References
}Referenced by 7 symbols