Skip to content
Source
Sign inSign up
Open History to see the last commit

schema-binary.ts

10 lines287 Bytes

1import * as SchemaBinary from "effect/encoding/SchemaBinary"
2import * as Schema from "effect/Schema"
3​
4const schema = Schema.Struct({
5 a: Schema.String,
6 b: Schema.optional(Schema.FiniteFromString),
7 c: Schema.Array(Schema.String)
8})
9​
10export const codec = SchemaBinary.toCodec(schema)