Class Router

A class representing a router for command-line arguments.

Implements

Constructors

Methods

Constructors

  • Creates a new Router instance.

    Parameters

    • config: ArgParserConfig

      The configuration for the router.

    • routes: Record<string, RouterAction>

      The routes for the router.

    Returns Router

Methods

  • Runs the router asynchronously.

    Parameters

    • Optionalargv: string[]

      The argument string.

    Returns Promise<void>