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

Function scopedContext

packages/effect/src/internal/layer.ts:957–964  ·  view source on GitHub ↗
(
  effect: Effect.Effect<Context.Context<A>, E, R>
)

Source from the content-addressed store, hash-verified

955
956/** @internal */
957export const scopedContext = <A, E, R>(
958 effect: Effect.Effect<Context.Context<A>, E, R>
959): Layer.Layer<A, E, Exclude<R, Scope.Scope>> => {
960 const scoped = Object.create(proto)
961 scoped._op_layer = OpCodes.OP_SCOPED
962 scoped.effect = effect
963 return scoped
964}
965
966/** @internal */
967export const scope: Layer.Layer<Scope.Scope> = scopedContext(

Callers 2

layer.tsFile · 0.85
scopedDiscardFunction · 0.85

Calls 1

createMethod · 0.80

Tested by

no test coverage detected