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
Kevin Gibbons 2024-12-27 11:17:55 -08:00 committed by GitHub
parent ba5992831b
commit 94191f7b09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -1539,9 +1539,10 @@ changes:
times. If `true`, all values will be collected in an array. If times. If `true`, all values will be collected in an array. If
`false`, values for the option are last-wins. **Default:** `false`. `false`, values for the option are last-wins. **Default:** `false`.
* `short` {string} A single character alias for the option. * `short` {string} A single character alias for the option.
* `default` {string | boolean | string\[] | boolean\[]} The default option * `default` {string | boolean | string\[] | boolean\[]} The default value to
value when it is not set by args. It must be of the same type as the be used if (and only if) the option does not appear in the arguments to be
`type` property. When `multiple` is `true`, it must be an array. 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 * `strict` {boolean} Should an error be thrown when unknown arguments
are encountered, or when arguments are passed that do not match the are encountered, or when arguments are passed that do not match the
`type` configured in `options`. `type` configured in `options`.