`Effect.serviceMembers` (and variants) do not recognize `Stream` returning members
Opened this issue · 6 comments
datner commented
interface Foo {
foo: Stream.Stream<never,never,number>
}
const tag = Context.Tag<Foo>()
const { foo /* <- nop */ } = Effect.serviceConstants(tag)
datner commented
@mikearnaldi ? 😄
mikearnaldi commented
cc @sledorze
sledorze commented
Oh indeed the focus was on Effects, may have a look later in the week
sledorze commented
Stream is not part of Effect/io
P.S.: This can wait for the great reunification of "everything is a Stream" (Londonian joke for @mikearnaldi)
datner commented
But it looks really lame 🥲
sledorze commented
@datner I agree,
I found out it can be an invaluable tool to reduce boilerplate for some particular usages.
@mikearnaldi any thinking on if we want to tackle this?
Ideas:
- Implement it in
effect/stream
and let the user aggregate both results - Implement aggregation out of
io
andstream
but exposed viaeffect
(where?)