Fake Mirrors
    Preparing search index...

    Class ReplServerRouter

    Represents the repl-server router.

    The router acts as root of a REPL server and handles the routing commants to their respective handlers.

    • get isActive(): boolean

      Checks if the router is active.

      Returns boolean

      true if the router is active, false otherwise.

    • Activates the router.

      Once activated, commands can be retrieved but not added.

      Returns this

      This router for method chaining.

    • Retrieves a command for a specific name.

      Commands can only be retrieved after the router is activated.

      Parameters

      • commandName: string

        The name of the command.

      Returns ReplServerCommand<ReplServerCommandArgs> | undefined

      The command object, or undefined if not found.

      Error If the router is not active.

    • Retrieves all commands names list.

      Names list can only be retrieved after the router is activated.

      Returns string[]

      The command names list.

      Error If the router is not active.

    • Retrieves all commands overview object.

      Overview object can only be retrieved after the router is activated.

      Returns Record<string, string>

      The command overview object.

      Error If the router is not active.

    • Registers the router as a singleton in the DI container.

      Parameters

      • container: DIContainer

        The DI container to register in.

      Returns void