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

Function unwrapEffect

packages/effect/src/internal/layer.ts:1213–1218  ·  view source on GitHub ↗
(
  self: Effect.Effect<Layer.Layer<A, E1, R1>, E, R>
)

Source from the content-addressed store, hash-verified

1211
1212/** @internal */
1213export const unwrapEffect = <A, E1, R1, E, R>(
1214 self: Effect.Effect<Layer.Layer<A, E1, R1>, E, R>
1215): Layer.Layer<A, E | E1, R | R1> => {
1216 const tag = Context.GenericTag<Layer.Layer<A, E1, R1>>("effect/Layer/unwrapEffect/Layer.Layer<R1, E1, A>")
1217 return flatMap(fromEffect(tag, self), (context) => Context.get(context, tag))
1218}
1219
1220/** @internal */
1221export const unwrapScoped = <A, E1, R1, E, R>(

Callers

nothing calls this directly

Calls 2

fromEffectFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected