You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think if we adjust the boolean type to always be a boolean, we should also adjust collectible options to always be an array.
Feel free to open a PR, but the typings for the command module are a bit complex. Let me know if you need help!
Summary
option("--empty-flag", "boolean switch")
may cause surprising behavior withdefault
value.case 1: empty flag cannot be used as
boolean
case 2: default option causes footgun behavior (always evaluates to
false
)however,
boolValue
always evaluates tofalse
regardless of whether flag is provided.similarly, default property completely overrides value mapper.
case 3: default value can be only used for action params
Possible Solutions?
default: false
overridable for empty flagsThe text was updated successfully, but these errors were encountered: