Class EventManager<Types, H>

Event manger, used to manage events and dispatch events to the correct handlers.

Type Parameters

  • Types extends string

  • H extends Handlers<Types>

Hierarchy

  • EventManager

Constructors

Properties

Methods

Constructors

  • Type Parameters

    Type Parameters

    • Types extends string

    • H extends Handlers<Types>

    Returns EventManager<Types, H>

Properties

subscriptions: Map<Types, Set<H[Types]>> = ...

Methods

  • Type Parameters

    Type Parameters

    • T extends string

    Parameters

    • event: T
    • Rest ...args: Parameters<H[T]>

    Returns Promise<void>

  • Type Parameters

    Type Parameters

    • T extends string

    Parameters

    • event: T

    Returns boolean

  • Type Parameters

    Type Parameters

    • T extends string

    Parameters

    • event: T
    • handler: H[T]

    Returns (() => void)

      • (): void
      • Returns void

Generated using TypeDoc