MCPcopy Create free account
hub / github.com/Effect-TS/effect / stream

Function stream

packages/experimental/src/Reactivity.ts:139–146  ·  view source on GitHub ↗
(
    tables: ReadonlyArray<unknown> | ReadonlyRecord<string, ReadonlyArray<unknown>>,
    effect: Effect.Effect<A, E, R>
  )

Source from the content-addressed store, hash-verified

137 })
138
139 const stream = <A, E, R>(
140 tables: ReadonlyArray<unknown> | ReadonlyRecord<string, ReadonlyArray<unknown>>,
141 effect: Effect.Effect<A, E, R>
142 ): Stream.Stream<A, E, Exclude<R, Scope.Scope>> =>
143 query(tables, effect).pipe(
144 Effect.map(Mailbox.toStream),
145 Stream.unwrapScoped
146 )
147
148 return Reactivity.of({ mutation, query, stream, unsafeInvalidate, invalidate, unsafeRegister })
149})

Callers

nothing calls this directly

Calls 3

queryFunction · 0.70
pipeMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected