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

Function unwrapScoped

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

Source from the content-addressed store, hash-verified

1218
1219/** @internal */
1220export const unwrapScoped = <A, E1, R1, E, R>(
1221 self: Effect.Effect<Layer.Layer<A, E1, R1>, E, R>
1222): Layer.Layer<A, E | E1, R1 | Exclude<R, Scope.Scope>> => {
1223 const tag = Context.GenericTag<Layer.Layer<A, E1, R1>>("effect/Layer/unwrapScoped/Layer.Layer<R1, E1, A>")
1224 return flatMap(scoped(tag, self), (context) => Context.get(context, tag))
1225}
1226
1227// -----------------------------------------------------------------------------
1228// logging

Callers 1

layer.tsFile · 0.70

Calls 2

scopedFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected