Documentation for Simbo's Packages
    Preparing search index...

    Interface MinimistOptions

    Minimist Options for Clirk

    Clirk supports all minimist options except boolean: true which is IMHO just unnecessary complexity without benefit.

    interface MinimistOptions {
        "--"?: boolean;
        alias?: { [key: string]: string | string[] };
        boolean?: string | string[];
        default?: { [key: string]: any };
        stopEarly?: boolean;
        string?: string | string[];
        unknown?: (arg: string) => boolean;
    }

    Hierarchy

    • Opts
      • MinimistOptions
    Index

    Properties

    "--"?: boolean

    When true, populate argv._ with everything before the -- and argv['--'] with everything after the --. Note that with -- set, parsing for arguments still stops after the --.

    alias?: { [key: string]: string | string[] }

    An object mapping string names to strings or arrays of string argument names to use as aliases

    boolean?: string | string[]

    A boolean, string or array of strings to always treat as booleans. If true will treat all double hyphenated arguments without equals signs as boolean (e.g. affects --foo, not -f or --foo=bar)

    default?: { [key: string]: any }

    An object mapping string argument names to default values

    stopEarly?: boolean

    When true, populate argv._ with everything after the first non-option

    string?: string | string[]

    A string or array of strings argument names to always treat as strings

    unknown?: (arg: string) => boolean

    A function which is invoked with a command line parameter not defined in the opts configuration object. If the function returns false, the unknown option is not added to argv