mirror of
https://github.com/Effect-TS/effect.git
synced 2026-12-02 03:15:52 +08:00
13 lines
402 B
TypeScript
13 lines
402 B
TypeScript
import * as Schema from "#dist/effect/Schema"
|
|
import * as SchemaRepresentation from "#dist/effect/SchemaRepresentation"
|
|
|
|
const schema = Schema.Struct({
|
|
a: Schema.String,
|
|
b: Schema.optional(Schema.FiniteFromString),
|
|
c: Schema.Array(Schema.String)
|
|
})
|
|
|
|
const representation = Schema.toRepresentation(schema)
|
|
|
|
SchemaRepresentation.toCodeDocument(SchemaRepresentation.toMultiDocument(representation))
|