mirror of
https://github.com/Effect-TS/effect.git
synced 2026-11-24 19:26:04 +08:00
11 lines
287 B
TypeScript
11 lines
287 B
TypeScript
import * as SchemaBinary from "effect/encoding/SchemaBinary"
|
|
import * as Schema from "effect/Schema"
|
|
|
|
const schema = Schema.Struct({
|
|
a: Schema.String,
|
|
b: Schema.optional(Schema.FiniteFromString),
|
|
c: Schema.Array(Schema.String)
|
|
})
|
|
|
|
export const codec = SchemaBinary.toCodec(schema)
|