• Creates an event processor that ensures the same event incoming from `AfterEvent keeper is not reported twice.

    The outgoing events supply is cut off once the incoming events supply do.

    Type Parameters

    • TEvent extends any[]

      An event type.

    Parameters

    • Optional isDuplicate: ((this, prior, next) => boolean)

      A function that checks whether the next incoming event is a duplicate of a previously reported one. Accepts a prior and next event tuples as parameters, and returns a truthy value if they are duplicates. By default, treats event tuples as duplicates if corresponding meaningful arguments are strictly equal.

        • (this, prior, next): boolean
        • Parameters

          • this: void
          • prior: TEvent
          • next: TEvent

          Returns boolean

    Returns ((this, input) => AfterEvent<TEvent>)

    Deduplicating processor of events incoming from @AfterEvent keeper.

  • Creates an event processor that similar events incoming from `AfterEvent keeper are not reported more than once.

    The outgoing events supply is cut off once the incoming events supply do.

    Type Parameters

    • TEvent extends any[]

      An event type.

    • TCue

      An event cue type.

    Parameters

    • isSimilar: ((this, prior, next) => boolean)

      A function that checks whether the next incoming event is similar to previously reported one. Accepts the prior and next event cues as parameters, and returns a truthy value if those are cues of similar events.

        • (this, prior, next): boolean
        • Parameters

          • this: void
          • prior: TCue
          • next: TCue

          Returns boolean

    • getCue: ((this, value) => TCue)

      A function that accepts an event tuple and returns its cue.

        • (this, value): TCue
        • Parameters

          • this: void
          • value: TEvent

          Returns TCue

    Returns ((this, input) => AfterEvent<TEvent>)

    Deduplicating processor of events incoming from @AfterEvent keeper.

Generated using TypeDoc