Effect CommunityEC
Effect Community3y ago
2 replies
schniz

Adding `toOption()` as a pipe-able function to `Schema.optional(s)`

have we considered having Schema.optional(s).toOption() as a pipe-able function? maybe something along the lines of Schema.string.pipe(Schema.optional.toOption)? where basically
function option(...) { ... }
option.toOption = (cfg) =>
  (schema) => option(schema, cfg).toOption()
Was this page helpful?