Skip to main content

Interface: Options

Properties​

alias?​

optional alias?: object

Map of option name to one or more aliases; aliases share the same value.

Index Signature​

[key: string]: string | string[]


boolean?​

optional boolean?: string[]

Option names to always treat as booleans, so the following token is not consumed as a value.


default?​

optional default?: object

Map of option name to default value, used when the option is absent.

Index Signature​

[key: string]: any


stopEarly?​

optional stopEarly?: boolean

When true, the first positional argument and everything after it are pushed into _.


string?​

optional string?: string[]

Option names to always coerce to strings (e.g. --port 80 yields "80").


unknown?​

optional unknown?: (optionName) => boolean

Callback invoked for each unrecognized option; return false to drop it, true (default) to keep it.

Parameters​

optionName​

string

Returns​

boolean