| 89 | }) {} |
| 90 | |
| 91 | class RecordMap extends LayerMap.Service<RecordMap>()("LayerMapTest/RecordMap", { |
| 92 | layers: { |
| 93 | short: makeLayer("short", acquired, released), |
| 94 | long: makeLayer("long", acquired, released) |
| 95 | }, |
| 96 | idleTimeToLive: (key) => { |
| 97 | const key_: "short" | "long" = key |
| 98 | return key_ === "short" ? 500 : 2000 |
| 99 | } |
| 100 | }) {} |
| 101 | |
| 102 | yield* Effect.scoped(LookupMap.contextEffect("short:a").pipe(Effect.provide(LookupMap.layer))) |
| 103 | yield* Effect.scoped(RecordMap.contextEffect("short").pipe(Effect.provide(RecordMap.layer))) |
nothing calls this directly
no test coverage detected