Open KonradLinkowski opened 1 year ago
Since this is simple to do, it’d make it all the more convenient for meow
to support this. It could be an option (like isRequired
for flags):
const cli = meow({
// …
inputIsRequired: true,
});
I think a simple boolean would be enough, but a function could be accepted like IsRequired
for completeness.
We may want more options for the input
in the future, so I would go with {input: {isRequired: true}}
.
That's not currently possible. It's easy enough to check the input manually and throw an error if it's not valid.