Service for registering and executing commands

Hierarchy

Methods

  • Create a command instance from a CommandConfig

    Throws

    Thrown if the command has not been registered yet

    Type Parameters

    • T = any

    Parameters

    Returns T

  • Execute the given command with it's registered command handler

    Returns

    result from the command handler

    Parameters

    Returns any

  • Check if a command is supported

    Returns

    true if the command is supported, false otherwise

    Parameters

    • commandId: CommandIdentifier<AnyCommand>

      identifier of the command. Can be either the class or the string the class was registered with

    Returns boolean