Options
All
  • Public
  • Public/Protected
  • All
Menu

Runs commands

Hierarchy

  • CommandRunner

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected container

container: Container

Protected handlers

handlers: Map<Class<CommandHandler>, CommandHandler> = new Map()

Protected subscribers

subscribers: Map<Class<CommandHandler>, SubscriberMetadata> = new Map()

Methods

emit

  • emit<T>(type: keyof SubscribersMetadata, HandlerClass: Class<T>, result: ReturnType<T["handle"]>): Promise<void>
  • Serially executes @BeforeCommand(Handler) or @AfterCommand(Handler) decorated methods for the given Handler.

    Type parameters

    Parameters

    Returns Promise<void>

run

  • run<T>(Handler: Class<T>, event: Parameters<T["handle"]>["0"]): Promise<ReturnType<T["handle"]>>

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Protected property
  • Private property
  • Static method

Generated using TypeDoc