mirror of https://github.com/nodejs/node.git
doc: expand description of `parseArg`'s `default`
PR-URL: https://github.com/nodejs/node/pull/54431 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jordan Harband <ljharb@gmail.com>pull/56379/head
parent
ba5992831b
commit
94191f7b09
|
@ -1539,9 +1539,10 @@ changes:
|
|||
times. If `true`, all values will be collected in an array. If
|
||||
`false`, values for the option are last-wins. **Default:** `false`.
|
||||
* `short` {string} A single character alias for the option.
|
||||
* `default` {string | boolean | string\[] | boolean\[]} The default option
|
||||
value when it is not set by args. It must be of the same type as the
|
||||
`type` property. When `multiple` is `true`, it must be an array.
|
||||
* `default` {string | boolean | string\[] | boolean\[]} The default value to
|
||||
be used if (and only if) the option does not appear in the arguments to be
|
||||
parsed. It must be of the same type as the `type` property. When `multiple`
|
||||
is `true`, it must be an array.
|
||||
* `strict` {boolean} Should an error be thrown when unknown arguments
|
||||
are encountered, or when arguments are passed that do not match the
|
||||
`type` configured in `options`.
|
||||
|
|
Loading…
Reference in New Issue