Interface ParsedArgumentsCollectionInterface

Interface for a collection of parsed arguments.

interface ParsedArgumentsCollectionInterface {
    options: Record<string, unknown>;
    positional: Record<string, unknown>;
    get<T = unknown>(name: string): T;
    has(name: string): boolean;
}

Implemented by

Properties

Methods

Properties

options: Record<string, unknown>

All optional arguments as a record.

positional: Record<string, unknown>

All positional arguments as a record.

Methods

  • Retrieves an argument value by name.

    Type Parameters

    • T = unknown

    Parameters

    • name: string

      The name of the argument.

    Returns T

    The value of the argument.

  • Checks if an argument exists in the collection.

    Parameters

    • name: string

      The name of the argument.

    Returns boolean

    True if the argument exists, false otherwise.