Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CommandArgumentConfig

Hierarchy

  • CommandArgumentConfig

Index

Properties

Optional alias

alias: string | null

same as the name, defined in the @command parameter, used to map arguments

Optional default

default: any | null

if not given, use this default as value

Optional description

description: string

a brief description of what this argument is about

Optional name

name: string

the name of the argument. usually defined in the @command name parameter. will be used to map arguments to a name for the result in the CommandArguments which is passed to the command's handle() func

Optional position

position: number

points to the index of arguments given, used to resolve the argument value from the parsed results

Optional required

required: boolean

If set as required, the command will error if the argument isn't given

Optional type

type: string

used to transform the user's input (string) into the right data-type. default: string can be: boolean, string, numeric or a custom function, which transforms the user's input string to the right data-type

Optional variadic

variadic: boolean

only the last argument should be variadic, this makes it an array of all arguments given after the position of this argument

Generated using TypeDoc