• Creates an event processor that consumes incoming events.

    Type Parameters

    • TEvent extends any[]

      Incoming event type. This is a list of consumer function parameter types.

    Parameters

    • consume: ((this, ...event) => undefined | void | SupplyPeer)

      A function consuming events. This function may return a SupplyPeer peer of event supply, e.g. when registers a nested event receiver. This supply will be cut off on new event, unless returned again.

        • (this, ...event): undefined | void | SupplyPeer
        • Parameters

          • this: void
          • Rest ...event: TEvent

          Returns undefined | void | SupplyPeer

    Returns ((this, input) => Supply)

    A function accepting incoming event supplier and returning event supply that will stop consuming events once cut off.

      • (this, input): Supply
      • Parameters

        Returns Supply

Generated using TypeDoc