• Creates an event processor that passes incoming events implementing the given type only.

    Type Parameters

    • TValue

      Incoming value type. This is a list of the test function parameter types.

    • TMatch

      Required value type.

    Parameters

    • test: ((this, event) => event is TMatch)

      Test function accepting incoming event as its only parameter, and returning truthy value if the value implements the given type, or falsy one otherwise.

        • (this, event): event is TMatch
        • Parameters

          • this: void
          • event: TValue

          Returns event is TMatch

    Returns ((this, supplier) => OnEvent<[TMatch]>)

    OnEvent sender mapper function.

      • (this, supplier): OnEvent<[TMatch]>
      • Parameters

        • this: void
        • supplier: OnEvent<[TValue]>

        Returns OnEvent<[TMatch]>

  • Creates an event processor that passes incoming events matching the given condition only.

    Type Parameters

    • TEvent extends any[]

      An event type. This is a list of the test function parameter types.

    Parameters

    • test: ((this, ...event) => boolean)

      Test function accepting incoming event as its parameters, and returning truthy value for matching events, or falsy one otherwise.

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

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

          Returns boolean

    Returns ((this, supplier) => OnEvent<TEvent>)

    OnEvent sender mapper function.

      • (this, supplier): OnEvent<TEvent>
      • Parameters

        • this: void
        • supplier: OnEvent<TEvent>

        Returns OnEvent<TEvent>

Generated using TypeDoc