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

Function fromEffect

packages/effect/src/Stream.ts:338–339  ·  view source on GitHub ↗
(effect: Effect.Effect<A, E, R>)

Source from the content-addressed store, hash-verified

336 * @since 2.0.0
337 */
338export const fromEffect = <A, E, R>(effect: Effect.Effect<A, E, R>): Stream<A, E, R> =>
339 fromChannel(Channel.fromEffect(Effect.map(effect, Arr.of)))
340
341/**
342 * Accesses a service from the context and emits it as a single element.

Callers 3

serviceFunction · 0.70
serviceOptionFunction · 0.70
Stream.tsFile · 0.70

Calls 2

fromChannelFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected