MCPcopy Create free account
hub / github.com/effect-app/libs / MyContextProvider2

Class MyContextProvider2

packages/infra/test/contextProvider.test.ts:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34class MyContextProvider2 extends Context.Service<MyContextProvider2>()(
35 "MyContextProvider2",
36 {
37 make: Effect.gen(function*() {
38 if (Math.random() > 0.5) return yield* new CustomError1()
39
40 return Effect.gen(function*() {
41 // we test without dependencies, so that we end up with an R of never.
42
43 return SomeElse.context({ b: 2 })
44 })
45 })
46 }
47) {
48 static readonly Default = Layer.effect(this, this.make)
49}
50
51class MyContextProvider2Gen extends Context.Service<MyContextProvider2Gen>()(
52 "MyContextProvider2Gen",

Callers

nothing calls this directly

Calls 1

contextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…