Skip to content

Commit 94191f7

Browse files
authored
doc: expand description of parseArg's default
PR-URL: #54431 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jordan Harband <[email protected]>
1 parent ba59928 commit 94191f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/api/util.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1539,9 +1539,10 @@ changes:
15391539
times. If `true`, all values will be collected in an array. If
15401540
`false`, values for the option are last-wins. **Default:** `false`.
15411541
* `short` {string} A single character alias for the option.
1542-
* `default` {string | boolean | string\[] | boolean\[]} The default option
1543-
value when it is not set by args. It must be of the same type as the
1544-
`type` property. When `multiple` is `true`, it must be an array.
1542+
* `default` {string | boolean | string\[] | boolean\[]} The default value to
1543+
be used if (and only if) the option does not appear in the arguments to be
1544+
parsed. It must be of the same type as the `type` property. When `multiple`
1545+
is `true`, it must be an array.
15451546
* `strict` {boolean} Should an error be thrown when unknown arguments
15461547
are encountered, or when arguments are passed that do not match the
15471548
`type` configured in `options`.

0 commit comments

Comments
 (0)