Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • D: CliDeclaration

Hierarchy

  • CommandBuilder

Index

Constructors

Methods

Constructors

constructor

Methods

alias

handle

  • Sets a command handler - a function to be called if the input string matches against the command. Important: a handler must be provided for a command, if you don't want your program to do anything, just pass () => {}

    Parameters

    • fn: CommandHandler<D>

      a function to be called for the command

    Returns CommandBuilder<D>

subCommands

  • Sets sub-command for the current command. The signature is similar to T in cli.commands({}, <T>).

    git remote add - is a "sub-command" where: git - is a program, remote - is a command add - is sub-command of command remote

    Parameters

    • subCommandSet: Record<string, CommandBuilder<any>>

      map (dictionary) of sub-commands

    Returns CommandBuilder<D>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc