jazz
jazz copied to clipboard
Allow defining default values in CoMaps
I wonder if encoded could never be optional, and it would require the Encoder itself to accept undefined values (as input) which it'll encode (maybe as undefined too)
co.encoded(Encoders.optional.Date)
// which is basically
co.encoded(Schema.UndefinedOr(Encoders.Date))
- The thing is that undefined is not a part of
JsonValueso it isn't allowed as an Encoder input or output [@effect/schema](https://effect-ts.github.io/effect/schema/Schema.ts.html#withdefaults)already allows to have default values upon creation, decoding, or both