Options
Modules
  • Command
  • Localization
  • Logger
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandArguments

Container for all compiled arguments passed to a Command at call-time

Hierarchy

  • CommandArguments

Index

Properties

flags

flags: Map<string, Flag>

Map of Flag identifiers to Flag instances

operands

operands: Operand<any>[]

Array containing every Operand passed to the Command

options

options: Map<string, Option<any>>

Map of Option identifiers to Option instances

Methods

compileMissingArgs

get

  • get<T>(ident: string | number): T
  • Gets a Command argument by identifier (or an Operand by numerical index). Will error if given an argument was not found for the given ident/index. This means that for error-safety you should only use this method to get arguments that were defined in your Command's argument specification.

    If for whatever reason you want to (relatively) safely access undeclared arguments you can use the operands array, the options map, and the flags map, just be sure to check that they exist before using them

    Type parameters

    • T: Argument<any, undefined | string, T>

    Parameters

    • ident: string | number

    Returns T

runBindings

Static empty

Static fromParse

Generated using TypeDoc