MCPcopy Index your code
hub / github.com/Effect-TS/effect / fromEffectOption

Function fromEffectOption

packages/effect/src/internal/stream.ts:3067–3078  ·  view source on GitHub ↗
(effect: Effect.Effect<A, Option.Option<E>, R>)

Source from the content-addressed store, hash-verified

3065
3066/** @internal */
3067export const fromEffectOption = <A, E, R>(effect: Effect.Effect<A, Option.Option<E>, R>): Stream.Stream<A, E, R> =>
3068 new StreamImpl(
3069 channel.unwrap(
3070 Effect.match(effect, {
3071 onFailure: Option.match({
3072 onNone: () => core.void,
3073 onSome: core.fail
3074 }),
3075 onSuccess: (a) => core.write(Chunk.of(a))
3076 })
3077 )
3078 )
3079
3080/** @internal */
3081export const fromPubSub: {

Callers 3

failFunction · 0.85
failSyncFunction · 0.85
stream.tsFile · 0.85

Calls 2

writeMethod · 0.65
ofMethod · 0.65

Tested by

no test coverage detected