Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/yargs_parser/lib/yargs-parser-types.ts>Configuration

💪 the mighty option parser used by yargs
Go to Latest
interface Configuration
import { type Configuration } from "https://deno.land/x/yargs_parser@yargs-parser-v21.1.0-deno/lib/yargs-parser-types.ts";

Properties

boolean-negation: boolean

Should variables prefixed with --no be treated as negations? Default is true

camel-case-expansion: boolean

Should hyphenated arguments be expanded into camel-case aliases? Default is true

combine-arrays: boolean

Should arrays be combined when provided by both command line arguments and a configuration file? Default is false

dot-notation: boolean

Should keys that contain . be treated as objects? Default is true

duplicate-arguments-array: boolean

Should arguments be coerced into an array when duplicated? Default is true

flatten-duplicate-arrays: boolean

Should array arguments be coerced into a single array when duplicated? Default is true

greedy-arrays: boolean

Should arrays consume more than one positional argument following their flag? Default is true

halt-at-non-option: boolean

Should parsing stop at the first text argument? This is similar to how e.g. ssh parses its command line. Default is false

nargs-eats-options: boolean

Should nargs consume dash options as well as positional arguments? Default is false

negation-prefix: string

The prefix to use for negated boolean variables. Default is 'no-'

parse-positional-numbers: boolean

Should positional values that look like numbers be parsed? Default is true

parse-numbers: boolean

Should keys that look like numbers be treated as such? Default is true

populate--: boolean

Should unparsed flags be stored in -- or _? Default is false

set-placeholder-key: boolean

Should a placeholder be added for keys not set via the corresponding CLI argument? Default is false

short-option-groups: boolean

Should a group of short-options be treated as boolean flags? Default is true

strip-aliased: boolean

Should aliases be removed before returning results? Default is false

strip-dashed: boolean

Should dashed keys be removed before returning results? This option has no effect if camel-case-expansion is disabled. Default is false

unknown-options-as-args: boolean

Should unknown options be treated like regular arguments? An unknown option is one that is not configured in opts. Default is false