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
constopts=[{names: ['force','f'],type: 'bool',help: 'Force everything (and say yes to everything).',default: 'foobar'// should be a boolean, but we give a string}]
last time I checked, dashdash will not complain.
I am guessing that this would also fly, etc:
constopts=[{names: ['force','f'],type: 'string',help: 'Force everything (and say yes to everything).',default: [1,2,3]// should be a string, but we have an array of numbers instead}]
the type of the default value should match the type? Or perhaps at least log a warning?
The text was updated successfully, but these errors were encountered:
I'll note that the current types (@types/dashdash@1.14.3 at time of writing) indicate that default should be string | undefined, which suggests the option default is pre-parsing?
If that's the case, I'm not sure if you'd be expected to write, say, default: "false" for a boolean (though I'd guess this is a trivial example).
Say I have this:
last time I checked, dashdash will not complain.
I am guessing that this would also fly, etc:
the type of the default value should match the type? Or perhaps at least log a warning?
The text was updated successfully, but these errors were encountered: