How should it looks like?
Proposal 1
Default is required for type-safety. This is also the TypeScript and Effect default.
name: Type.optional(Type.Text),
This is also maps exactly to what Effect does: https://effect.website/docs/schema/advanced-usage/#basic-optional-property
All optional version for debugging
Sometimes this is super useful. Deriving a form from it where validation only happens at the end. We could have utility that does that e.g. const EventOptional = makeAllFieldsOptional(Event)
Implementation Notes
this need a change for all the field[key] === Entity.Date checks
How should it looks like?
Proposal 1
Default is required for type-safety. This is also the TypeScript and Effect default.
This is also maps exactly to what Effect does: https://effect.website/docs/schema/advanced-usage/#basic-optional-property
All optional version for debugging
Sometimes this is super useful. Deriving a form from it where validation only happens at the end. We could have utility that does that e.g.
const EventOptional = makeAllFieldsOptional(Event)Implementation Notes
this need a change for all the
field[key] === Entity.Datechecks