Function forward

  • Syntactic sugar for a pipe between a source and a sink, in which matching events of the source become calls on the sink, after going through the mapper.

    Example

    forward(inbox, EMAIL.match, outbox, ({ payload }) => MAPPED(payload))
    

    Type Parameters

    • Subtype

    • MappedType = Action<Subtype>

    Parameters

    • source: Observable<any>
    • matcher: ((i: Action<Subtype>) => i is Action<Subtype>) | ((i: Action<Subtype>) => boolean)
    • sink: ((v: MappedType) => void)
        • (v: MappedType): void
        • Parameters

          • v: MappedType

          Returns void

    • mapper: ((i: Action<Subtype>) => MappedType)
        • (i: Action<Subtype>): MappedType
        • Parameters

          • i: Action<Subtype>

          Returns MappedType

    Returns Subscription

Generated using TypeDoc