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

Function unwrapScoped

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

Source from the content-addressed store, hash-verified

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

Callers 1

layer.tsFile · 0.70

Calls 2

scopedFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected