-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
pending releaseOn a branch for eventual release, but not yet merged to main.On a branch for eventual release, but not yet merged to main.
Description
Consider:
.option(flags, description, defaultValue)
Commander types this to match the possible option value types (tj/commander.js#1721 (comment)), leaving aside coercion:
defaultValue?: string | boolean | string[]
which allow options defined with matching defaults like:
.option('--string <value>', 'description, 'DEFAULT') // string
.option('--boolean', 'description', false) // boolean
.option('--variadic <value...>, ['DEFAULT']) // string[]
In extra-typings we could restrict the default type to match the flag type?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
pending releaseOn a branch for eventual release, but not yet merged to main.On a branch for eventual release, but not yet merged to main.