Open Schniz opened 4 years ago
I have implemented it. Wasn't hard. But I'm not sure that it is far better than:
const extended = {
someName: myParser(),
otherName: otherName(),
} as const
command({
args: { ...extended }
...
})
Maybe I will do it just for the sake of single responsibility, the command
function is fairly large. Extracting the object parsing into an object
would kinda make sense for maintainability.
The basic should be the same as
command
, and maybecommand
should use it internally: