| 54 | ] |
| 55 | |
| 56 | class 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 | |
| 72 | const program = Effect.gen(function*() { |
| 73 | const somethingRepo = yield* SomethingRepo |