mirror of
https://github.com/Effect-TS/effect.git
synced 2026-11-26 02:16:04 +08:00
11 lines
358 B
TypeScript
11 lines
358 B
TypeScript
import * as Schema from "effect/Schema"
|
|
import * as SchemaRepresentation from "effect/SchemaRepresentation"
|
|
|
|
const schema = Schema.Struct({
|
|
a: Schema.String,
|
|
b: Schema.optional(Schema.FiniteFromString),
|
|
c: Schema.Array(Schema.String)
|
|
})
|
|
|
|
export const document = SchemaRepresentation.toCodeDocument(SchemaRepresentation.toRepresentations([schema.ast]))
|