Class CsvFormatter

Implements formatting of CSV help messages for a set of option definitions.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

  • Parameters

    • validator: OptionValidator
    • Optional config: FormatterConfig
    • additionalFields: readonly ("version" | "positional" | "config" | "sections" | "useNested" | "useFormat" | "useFilter" | "saveMessage" | "default" | "preferredName" | "desc" | "group" | "limit" | "required" | "options" | "exec" | "names" | "trim" | "link" | "paramName" | "clusterLetters" | "example" | "inline" | "separator" | "case" | "conv" | "append" | "unique" | "requires" | "resolve" | "negationNames" | "deprecated" | "styles" | "truthNames" | "falsityNames" | "regex" | "range" | "enums" | "fallback" | "clusterPrefix" | "caseSensitive" | "type" | "hide" | "break" | "paramCount" | "skipCount" | "complete" | "requiredIf" | "envVar" | "parse")[] = ...

    Returns CsvFormatter

Properties

context: HelpContext
fields: readonly ("version" | "positional" | "config" | "sections" | "useNested" | "useFormat" | "useFilter" | "saveMessage" | "default" | "preferredName" | "desc" | "group" | "limit" | "required" | "options" | "exec" | "names" | "trim" | "link" | "paramName" | "clusterLetters" | "example" | "inline" | "separator" | "case" | "conv" | "append" | "unique" | "requires" | "resolve" | "negationNames" | "deprecated" | "styles" | "truthNames" | "falsityNames" | "regex" | "range" | "enums" | "fallback" | "clusterPrefix" | "caseSensitive" | "type" | "hide" | "break" | "paramCount" | "skipCount" | "complete" | "requiredIf" | "envVar" | "parse")[]
groups: Readonly<Record<string, readonly CsvHelpEntry[]>>

Methods

  • Formats the help message of an option group. Options are rendered in the same order as was declared in the option definitions.

    Parameters

    • name: string = ''

      The group name (defaults to the default group)

    Returns TextMessage

    The help message, if the group exists; otherwise an empty message