Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unknown flag values to be passed in explicitly #13

Merged
merged 6 commits into from
Oct 27, 2022
Prev Previous commit
Next Next commit
Merge branch 'develop' of github.com:privatenumber/type-flag into exp…
…licit-unknown
  • Loading branch information
privatenumber committed Oct 26, 2022
commit 40eaaec871c9789cf10a6ee47223c1155fd05136
4 changes: 2 additions & 2 deletions src/type-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export function typeFlag<Schemas extends Flags>(
hasAlias.schema,
isLastAlias ? flagValue : true,
);
} else if (options.ignoreUnknown) {
} else if (ignoreUnknown) {
parsed._.push(argvElement);
} else {
setUnknown(alias, isLastAlias ? flagValue : true);
Expand All @@ -154,7 +154,7 @@ export function typeFlag<Schemas extends Flags>(
}

if (!flagSchema) {
if (options.ignoreUnknown) {
if (ignoreUnknown) {
parsed._.push(argvElement);
} else {
setUnknown(flagName, flagValue);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.