• Creates an event processor that translates events incoming from OnEvent sender.

    The translated events expected to be sent by the given translate function.

    Type Parameters

    • TInEvent extends any[]

      Incoming event type.

    • TOutEvent extends any[]

      Outgoing translated event type.

    Parameters

    • translate: ((this, send, ...event) => void)

      Event translation function. Accepts an outgoing event sender function as first parameter, and incoming event as the rest of them.

        • (this, send, ...event): void
        • Parameters

          • this: void
          • send: ((...event) => void)
              • (...event): void
              • Parameters

                • Rest ...event: TOutEvent

                Returns void

          • Rest ...event: TInEvent

          Returns void

    Returns ((this, input) => OnEvent<TOutEvent>)

    A mapping function of incoming event sender to another one.

      • (this, input): OnEvent<TOutEvent>
      • Parameters

        • this: void
        • input: OnEvent<TInEvent>

        Returns OnEvent<TOutEvent>

Generated using TypeDoc