antares icon indicating copy to clipboard operation
antares copied to clipboard

Accept complete and error props In 3rd argument to `on`

Open deanrad opened this issue 6 years ago • 0 comments

A handler attached via on may want to have its completion and error notifications be of a certain type. Currently the type property of the 3rd argument specifies how to wrap next notifications, this issue would bring it full cycle, so the author would not need to resort to concat and processResults: true as is necessary in a case like below.

 return concat(
        from(goodLines.map(line => ({ type: "goodLine", payload: line }))),
        of({ type: "linesDone" })
      )
    },
    { processResults: true }

https://gist.github.com/deanius/5aba8edf0f102a6269dfbf66a325e96b

deanrad avatar Feb 18 '19 04:02 deanrad