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

Function composeOptionalEffect

packages/effect/src/SchemaGetter.ts:204–210  ·  view source on GitHub ↗
(
  first: Getter<T, E, R>,
  second: Getter<T2, T, R2>
)

Source from the content-addressed store, hash-verified

202 Object.assign(Object.create(Pipeable.Prototype), fields)
203
204const composeOptionalEffect = <T, E, R, T2, R2>(
205 first: Getter<T, E, R>,
206 second: Getter<T2, T, R2>
207): Getter<T2, E, R | R2> =>
208 transformOptionalEffect((input, options) =>
209 Effect.flatMapEager(runGetter(first, input, options), (output) => runGetter(second, output, options))
210 )
211
212/**
213 * Composes two getters by passing the output of the first to the second.

Callers 1

SchemaGetter.tsFile · 0.85

Calls 2

transformOptionalEffectFunction · 0.85
runGetterFunction · 0.85

Tested by

no test coverage detected