Class ArgumentParser<T>

Implements parsing of command-line arguments into option values.

Type Parameters

Constructors

Properties

Methods

Constructors

Properties

validator: OptionValidator

Methods

  • Parses command-line arguments into option values.

    Parameters

    Returns Promise<{
        -readonly [key in string | number | symbol]: OptionDataType<T[key]>
    }>

    The options' values

  • Parses command-line arguments into option values.

    Parameters

    • values: {
          -readonly [key in string | number | symbol]: OptionDataType<T[key]>
      }

      The options' values to parse into

    • cmdLine: string | string[] = ...

      The command line or arguments

    • Optional flags: ParsingFlags

      The parsing flags

    Returns Promise<ParsingResult>

    The parsing result