Stream.unwrap Simplifies Event Processing Pipeline in TypeScript
I just learnt about
Into this:
I wonder, is this correct?
The types (an a simplified manner for your context):
-
-
So far, nothing is scoped (as I assume the underlying libraries are handling that).
I recently asked if this patter of having Streams nested into Effects is correct, which to me is not but I am not very experienced in neither Effect.Stream or Effect itself, so I am never sure if I'm doing things that are semantically correct or if I'm going my way.
The naming is also a bit strange for me, as unwrap to me usually means going from
Stream.unwrap, and looking to simplify a pipeline that I have looking like this:Into this:
I wonder, is this correct?
The types (an a simplified manner for your context):
-
readByLAbel => Effect<Something,unknown,never>-
toStream => Something => Stream<A[]> So far, nothing is scoped (as I assume the underlying libraries are handling that).
I recently asked if this patter of having Streams nested into Effects is correct, which to me is not but I am not very experienced in neither Effect.Stream or Effect itself, so I am never sure if I'm doing things that are semantically correct or if I'm going my way.
The naming is also a bit strange for me, as unwrap to me usually means going from
Monad<A> => A with a helper function in between if needed. But here it means going from another thing to the stream one, which I could have never figured out