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

Function stream

packages/effect/src/unstable/reactivity/Reactivity.ts:177–184  ·  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

175 })
176
177 const stream = <A, E, R>(
178 tables: ReadonlyArray<unknown> | ReadonlyRecord<string, ReadonlyArray<unknown>>,
179 effect: Effect.Effect<A, E, R>
180 ): Stream.Stream<A, E, Exclude<R, Scope.Scope>> =>
181 query(tables, effect).pipe(
182 Effect.map(Stream.fromQueue),
183 Stream.unwrap
184 )
185
186 const withBatch = <A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R> =>
187 Effect.suspend(() => {

Callers 1

Atom.tsFile · 0.70

Calls 3

queryFunction · 0.70
pipeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected