• Creates an event processor that converts events incoming from AfterEvent keeper with the given converter function.

    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 converted outgoing event.

        • (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.

    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 converted outgoing event.

        • (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