Class Distributor<TPayload>

Provides a distribution method to publish payloads to multiple subscribers

Type Parameters

  • TPayload

Hierarchy

  • Distributor

Constructors

Properties

_ee: EventEmitter
_subscriptions: Map<string, ((event: TPayload) => void)>
_uuid: string

Accessors

Methods

  • Subscribe to the distributor and receive all payloads asynchronously

    Parameters

    • handlerFn: ((event: TPayload) => void)
        • (event: TPayload): void
        • Parameters

          • event: TPayload

          Returns void

    Returns string

Generated using TypeDoc