• Creates an event processor that converts events incoming from OnEvent sender with the given converter function, and does not share the outgoing events supply.

    Type Parameters

    • TEvent extends any[]

      Incoming events type.

    • TResult

      Outgoing events type.

    Parameters

    • convert: ((this, ...event) => TResult)

      A converter function that accepts incoming event as parameters and returns outgoing event value.

        • (this, ...event): TResult
        • Parameters

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

          Returns TResult

    Returns ((this, input) => AfterEvent<[TResult]>)

    New event mapper.

  • Creates an event processor that converts events incoming from OnEvent sender with the given converter function and fallback, and does not share the outgoing events supply.

    Type Parameters

    • TEvent extends any[]

      Incoming events type.

    • TResult

      Outgoing events type.

    Parameters

    • convert: ((this, ...event) => TResult)

      A converter function that accepts incoming event as parameters and returns outgoing event value.

        • (this, ...event): TResult
        • Parameters

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

          Returns TResult

    • fallback: ((this) => TResult)

      A function creating a fallback of outgoing event.

        • (this): TResult
        • Parameters

          • this: void

          Returns TResult

    Returns ((this, input) => AfterEvent<[TResult]>)

    New event mapper.

Generated using TypeDoc