Class AnsiFormatter

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

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

context: HelpContext
groups: Readonly<Record<string, readonly AnsiHelpEntry[]>>

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 AnsiMessage

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