DEV Community

Discussion on: Creating a CLI for your Node.js app using Typescript

Collapse
 
int0h profile image
int0h

I tried to reproduce it. But yargs worked for me. Both app -o a -o b and app -o a b printed o: ['a', 'b']. The first approach also worked with typed-cli. Can you provide with a code sample of what you mean exactly?

Collapse
 
rulatir profile image
rulatir • Edited

Turns out it was not choices that was the culprit but requiresArg. It's an embarrasing, long-standing bug in yargs. I made a PR to revert the commit that introduced it.