From be9428a96973a38e689675f5d60407d7779f2b6e Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Fri, 27 Dec 2024 11:17:55 -0800 Subject: [PATCH] doc: expand description of `parseArg`'s `default` PR-URL: https://github.com/nodejs/node/pull/54431 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Jordan Harband --- doc/api/util.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/util.md b/doc/api/util.md index 74e37f237a9e1d..9db295b196c606 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1422,9 +1422,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`.