Share via


ParseArgsOptionDescriptor interface

Properties

default

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.

multiple

Whether this option can be provided multiple times. If true, all values will be collected in an array. If false, values for the option are last-wins.

short

A single character alias for the option.

type

Type of argument.

Property Details

default

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.

default?: string | boolean | string[] | boolean[]

Property Value

string | boolean | string[] | boolean[]

multiple

Whether this option can be provided multiple times. If true, all values will be collected in an array. If false, values for the option are last-wins.

multiple?: boolean

Property Value

boolean

short

A single character alias for the option.

short?: string

Property Value

string

type

Type of argument.

type: ParseArgsOptionsType

Property Value