I've got a typescript program that I'm trying to use yargs with, but I'm having trouble getting yargs to correctly detect invalid commands:
let test = yargs.command('test', '');
test.strict();
let args = test.parse(['fake', 'blah', 'test', 'whydoesitacceptthis']);
Why does yargs accept this? Also, the resulting args
parses flags correctly, but args._
(which is the non-flag arguments) becomes ['test', 'fake', 'blah', 'test', 'whydoesitacceptthis']
. How do I prevent yargs from accepting invalid commands?