Options
All
  • Public
  • Public/Protected
  • All
Menu

Initialize a new Option with the given flags and description.

param
param

Hierarchy

  • Option

Index

Constructors

constructor

  • new Option(flags: string, description: string): Option

Properties

bool

bool: boolean

defaultValue

defaultValue: string

description

description: string

flags

flags: string

long

long: string

optional

optional: boolean

required

required: boolean

short

short: string

Methods

arity

  • arity(): number
  • Returns number of args that are expected by the option. Can only be 0 or 1.

    Returns number

attributeName

  • attributeName(): string
  • Return option name, in a camelcase format that can be used as a object attribute key.

    Returns string

is

  • is(arg: string): boolean
  • Check if arg matches the short or long flag. Internally used to check if an arg belongs to an Option

    Parameters

    • arg: string

    Returns boolean

name

  • name(): string
  • Return option name.

    Returns string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • 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