MCPcopy
hub / github.com/Effect-TS/effect / makeLayer3

Function makeLayer3

packages/effect/test/Layer.test.ts:794–802  ·  view source on GitHub ↗
(ref: Ref.Ref<Chunk.Chunk<string>>)

Source from the content-addressed store, hash-verified

792}
793export const Service3Tag = Context.GenericTag<Service3>("Service3")
794export const makeLayer3 = (ref: Ref.Ref<Chunk.Chunk<string>>): Layer.Layer<Service3> => {
795 return Layer.scoped(
796 Service3Tag,
797 Effect.acquireRelease(
798 ref.pipe(Ref.update(Chunk.append(acquire3)), Effect.as(new Service3())),
799 () => Ref.update(ref, Chunk.append(release3))
800 )
801 )
802}

Callers 1

Layer.test.tsFile · 0.85

Calls 2

pipeMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected