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

Class SomethingRepo

packages/infra/examples/query.ts:56–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54]
55
56class SomethingRepo extends Effect.Service<SomethingRepo>()("SomethingRepo", {
57 effect: Effect.gen(function*() {
58 return yield* makeRepo("Union", Union, {})
59 }),
60 dependencies: [MemoryStoreLive]
61}) {
62 static readonly Test = Layer
63 .effect(
64 this,
65 makeRepo("Union", Union, { makeInitial: Effect.sync(() => items) }).pipe(Effect.map(this.make))
66 )
67 .pipe(
68 Layer.provide(MemoryStoreLive)
69 )
70}
71
72const program = Effect.gen(function*() {
73 const somethingRepo = yield* SomethingRepo

Callers

nothing calls this directly

Calls 5

makeRepoFunction · 0.90
syncMethod · 0.80
pipeMethod · 0.65
mapMethod · 0.65
provideMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…