Closed joepjoosten closed 1 month ago
There is Options.withSchema
: https://effect-ts.github.io/effect/cli/Options.ts.html#withschema
What was your suggestion?
Ah, yes! Thank you. It was also due to my misinterpretation of clamp why i couldn't get an error when a number outside the range was not throwing an error. I need Schema.between ...
Sorry about that!
Thank you!
What is the problem this feature would solve?
If you add a options constructor for schema's you leverage the power of schema's, to encode a string options into anything schema supports:
Simple example:
What is the feature you are proposing to solve the problem?
You get the build in functions that schema supports.
I know this would can create a coupling between @effect/cli and @effect/schema, but isn't @effect/schema becoming a de-facto standard package (like effect itself) for all other packages?
What alternatives have you considered?
Creating my own set of option validators...