Class JsonFormatter

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

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

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

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 JsonMessage

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