Interface JackOptions

Options provided to the Jack constructor


  • JackOptions


allowPositionals?: boolean

Whether to allow positional arguments


env?: {
    [k: string]: string | undefined;

Environment object to read/write. Defaults process.env. No effect if envPrefix is not set.

Type declaration

  • [k: string]: string | undefined
envPrefix?: string

Prefix to use when reading/writing the environment variables

If not specified, environment behavior will not be available.

stopAtPositional?: boolean

Stop parsing flags and opts at the first positional argument. This is to support cases like cmd [flags] <subcmd> [options], where each subcommand may have different options. This effectively treats any positional as a -- argument. Only relevant if allowPositionals is true.

To do subcommands, set this option, look at the first positional, and parse the remaining positionals as appropriate.


usage?: string

A short usage string. If not provided, will be generated from the options provided, but that can of course be rather verbose if there are a lot of options.

Generated using TypeDoc