ParseArgsOptionDescriptor interface
属性
| default | 要分配给该选项的值(如果未显示在要分析的参数中)。 该值必须与属性指定的 |
| multiple | 是否可以多次提供此选项。
如果 |
| short | 选项的单个字符别名。 |
| type | 参数的类型。 |
属性详细信息
default
要分配给该选项的值(如果未显示在要分析的参数中)。 该值必须与属性指定的 type 类型匹配。
true如果是multiple,则它必须是数组。 当选项出现在要分析的参数中时,不会应用任何默认值,即使提供的值是假的。
default?: string | boolean | string[] | boolean[]
属性值
string | boolean | string[] | boolean[]
multiple
是否可以多次提供此选项。
如果 true,将在数组中收集所有值。
如果 false为此选项的值是最后一胜。
multiple?: boolean
属性值
boolean
short
选项的单个字符别名。
short?: string
属性值
string