Home Manual Reference Source Test
import Option from 'atscm-cli/src/lib/cli/Option.js'
public class | source

Option

A command line option.

Test:

Static Method Summary

Static Public Methods
public static

boolean(desc: string, options: Object): Option

Shorthand to create an Option with type boolean.

public static

string(desc: string, options: Object): Option

Shorthand to create an Option with type string.

Constructor Summary

Public Constructor
public

constructor(desc: string, options: Object)

Creates a new Option based on a description and some options.

Member Summary

Public Members
public

A string describing the option.

Static Public Methods

public static boolean(desc: string, options: Object): Option source

Shorthand to create an Option with type boolean.

Params:

NameTypeAttributeDescription
desc string

A string describing the option. Used for help texts.

options Object
  • optional
  • default: {type: 'boolean'}

The options to create the Option with.

Return:

Option

An Option with type boolean.

Test:

public static string(desc: string, options: Object): Option source

Shorthand to create an Option with type string.

Params:

NameTypeAttributeDescription
desc string

A string describing the option. Used for help texts.

options Object
  • optional
  • default: {type: 'string', requiresArg: true}

The options to create the Option with.

Return:

Option

An Option with type string.

Test:

Public Constructors

public constructor(desc: string, options: Object) source

Creates a new Option based on a description and some options.

Params:

NameTypeAttributeDescription
desc string

A string describing the option. Used for help texts.

options Object
  • optional
  • default: {}

The options to create the Option with. Refer to yarg's documentation in order to know what options can be used here.

Test:

See:

Public Members

public desc: String source

A string describing the option. Used for help texts.