Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ReadonlyCommandCollection

Hierarchy

Implements

Index

Properties

Protected _alias

_alias: Map<string, Command[]> = new Map<string, Command[]>()

Protected _commands

_commands: Map<string, Command> = new Map<string, Command>()

Methods

[Symbol.iterator]

  • [Symbol.iterator](): Iterator<Command>

get

  • get(name: string): Command | undefined
  • Returns a command by its name of its alias, or undefined if not found.

    Parameters

    • name: string

      The command's name or alias.

    Returns Command | undefined

    The command or undefined.

hasAlias

  • hasAlias(alias: string): boolean
  • Determines if this collection contains the alias.

    Parameters

    • alias: string

      Alias to check.

    Returns boolean

    Either or not this collection contains the alias.

values

  • values(): IterableIterator<Command>

Generated using TypeDoc