• Creates an event processor that sends the values of events incoming from AfterEvent keeper.

    Events are valued by provided value function. The null, undefined, and false values are dropped.

    Type Parameters

    • TEvent extends any[]

      Incoming event type.

    • TValue

      Event value type.

    Parameters

    • valueOf: ((this, ...event) => undefined | null | false | TValue)

      Event value detector function. Accepts incoming event as parameters and returns either its value, or false/null/undefined to ignore it.

        • (this, ...event): undefined | null | false | TValue
        • Parameters

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

          Returns undefined | null | false | TValue

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

    New event processor.

  • Creates an event processor that sends the values of events incoming from OnEvent sender or a fallback value.

    Events are valued by provided value function. The null, undefined, and false values are dropped.

    Type Parameters

    • TEvent extends any[]

      Incoming event type.

    • TValue

      Event value type.

    Parameters

    • valueOf: ((this, ...event) => undefined | null | false | TValue)

      Event value detector function. Accepts incoming event as parameters and returns either its value, or false/null/undefined to ignore it.

        • (this, ...event): undefined | null | false | TValue
        • Parameters

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

          Returns undefined | null | false | TValue

    • fallback: ((this) => TValue)

      A function creating a fallback value.

        • (this): TValue
        • Parameters

          • this: void

          Returns TValue

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

    New event processor.

Generated using TypeDoc