Roaders / ts-command-line-args

A typescript wrapper for command-line-args that allow you to generate config from existing TS interfaces
26 stars 11 forks source link

Fixing issue with unknown properties and stopAtFirstUnknown #10

Closed markbiddlecom closed 3 years ago

markbiddlecom commented 3 years ago

When using argument groups, command-line-args::parse returns an object with the arguments added into groups. ts-command-line-args ignores every group except for _all, which makes sense, but doesn't work when also trying to use stopAtFirstUnknown. This change simply adds the _unknown arguments back in this case, and adds some test cases to cover the issue.