(store: RawStore)
| 13 | // instead of one undifferentiated "user_store" bucket, and failures log which |
| 14 | // query actually failed. |
| 15 | const makeService = (store: RawStore) => ({ |
| 16 | use: <A>(op: string, fn: (s: RawStore) => Promise<A>) => |
| 17 | withServiceLogging( |
| 18 | `user_store.${op}`, |
| 19 | () => new UserStoreError(), |
| 20 | tryPromiseService(() => fn(store)), |
| 21 | ), |
| 22 | }); |
| 23 | |
| 24 | type UserStoreServiceType = ReturnType<typeof makeService>; |
| 25 |
no test coverage detected