Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Help

Index

Constructors

  • Returns Help

Properties

helpWidth?: number

output helpWidth, long lines are wrapped to fit

sortOptions: boolean
sortSubcommands: boolean

Methods

  • argumentDescription(argument: Argument): string
  • Get the argument description to show in the list of arguments.

    Parameters

    Returns string

  • argumentTerm(argument: Argument): string
  • Get the argument term to show in the list of arguments.

    Parameters

    Returns string

  • commandDescription(cmd: Command): string
  • Get the description for the command.

    Parameters

    Returns string

  • Get the command usage to be displayed at the top of the built-in help.

    Parameters

    Returns string

  • Generate the built-in help text.

    Parameters

    Returns string

  • longestArgumentTermLength(cmd: Command, helper: Help): number
  • Get the longest argument term length.

    Parameters

    Returns number

  • longestOptionTermLength(cmd: Command, helper: Help): number
  • Get the longest option term length.

    Parameters

    Returns number

  • longestSubcommandTermLength(cmd: Command, helper: Help): number
  • Get the longest command term length.

    Parameters

    Returns number

  • optionDescription(option: Option): string
  • Get the option description to show in the list of options.

    Parameters

    Returns string

  • optionTerm(option: Option): string
  • Get the option term to show in the list of options.

    Parameters

    Returns string

  • Calculate the pad width from the maximum term length.

    Parameters

    Returns number

  • subcommandDescription(cmd: Command): string
  • Get the command summary to show in the list of subcommands.

    Parameters

    Returns string

  • subcommandTerm(cmd: Command): string
  • Get the command term to show in the list of subcommands.

    Parameters

    Returns string

  • Get an array of the arguments which have descriptions.

    Parameters

    Returns Argument[]

  • Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.

    Parameters

    Returns Command[]

  • Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.

    Parameters

    Returns Option[]

  • wrap(str: string, width: number, indent: number, minColumnWidth?: number): string
  • Wrap the given string to width characters per line, with lines after the first indented. Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.

    Parameters

    • str: string
    • width: number
    • indent: number
    • Optional minColumnWidth: number

    Returns string

Generated using TypeDoc