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

Function makeLayer1

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

Source from the content-addressed store, hash-verified

762}
763export const Service1Tag = Context.GenericTag<Service1>("Service1")
764export const makeLayer1 = (ref: Ref.Ref<Chunk.Chunk<string>>): Layer.Layer<Service1> => {
765 return Layer.scoped(
766 Service1Tag,
767 Effect.acquireRelease(
768 ref.pipe(Ref.update(Chunk.append(acquire1)), Effect.as(new Service1())),
769 () => Ref.update(ref, Chunk.append(release1))
770 )
771 )
772}
773export class Service2 {
774 two(): Effect.Effect<number> {
775 return Effect.succeed(2)

Callers 1

Layer.test.tsFile · 0.85

Calls 2

pipeMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected