( label: string, run: () => Promise<A>, )
| 215 | }; |
| 216 | |
| 217 | export const fumaEffect = <A>( |
| 218 | label: string, |
| 219 | run: () => Promise<A>, |
| 220 | ): Effect.Effect<A, StorageFailure> => |
| 221 | Effect.tryPromise({ |
| 222 | try: run, |
| 223 | catch: (cause) => fumaFailureFromCause(label, cause), |
| 224 | }); |
| 225 | |
| 226 | export const activeFumaDbRef = Context.Reference<FumaDb | null>("executor/ActiveFumaDb", { |
| 227 | defaultValue: () => null, |
no test coverage detected