Class ArgumentAbstract

Represents a command argument.

Example

class MyArgument extends Argument {
name = 'my-argument';
}

Hierarchy

Constructors

Properties

Accessors

Methods

Constructors

Properties

command: Command

The command the argument belongs to.

description?: string

The description of the argument.

name: string

The name of the argument.

required: boolean = true

Whether the argument is required.

Accessors

Methods

  • Validates the argument.

    Returns

    The validated value, or error.

    Example

    argument.validate('hello'); // 'hello'
    

    Parameters

    • value: string

      The value of the argument.

    Returns Promise<unknown>