Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICommandPositionalDefinition

Positional option definition - used on a command definition to define positional operands. Positional operands do not use --dashes. They are values specified after the full command string e.g. group group group group command mypositional --dash-option

Hierarchy

  • ICommandPositionalDefinition

Index

Properties

description

description: string

The description for the positional operand - used in the help and error messages.

memberof

ICommandPositionalDefinition

name

name: string

The name of the positional operand.

This name cannot contain a dash (-) or else the positional argument will not function properly. This is a limitation of yargs.

Appending "..." to the end of a name will allow for a space delimited array of arguments. So if you specify name = "abcd..." and then "a b c d" is specified for the positional argument, abcd = ["a", "b", "c", "d"]

memberof

ICommandPositionalDefinition

Optional regex

regex: string

A regex that will be used to match the input for this positional for validation.

memberof

ICommandPositionalDefinition

Optional required

required: boolean

True if this positional is required.

memberof

ICommandPositionalDefinition

Optional stringLengthRange

stringLengthRange: [number, number]

What is an acceptable length range for your positional? e.g. between 1 and 8 characters: [1,8]

memberof

ICommandPositionalDefinition

type

The option type - used to validate that the user provided value is acceptable.

memberof

ICommandPositionalDefinition

Generated using TypeDoc