(options: {
readonly key: (entry: Request.Entry<A>) => K
readonly resolver: (entries: NonEmptyArray<Request.Entry<A>>, key: K) => Effect.Effect<void, Request.Error<A>>
})
| 292 | * @since 4.0.0 |
| 293 | */ |
| 294 | export const makeGrouped = <A extends Request.Any, K>(options: { |
| 295 | readonly key: (entry: Request.Entry<A>) => K |
| 296 | readonly resolver: (entries: NonEmptyArray<Request.Entry<A>>, key: K) => Effect.Effect<void, Request.Error<A>> |
| 297 | }): RequestResolver<A> => |
| 298 | makeWith({ |
| 299 | batchKey: hashGroupKey(options.key), |
| 300 | delay: Effect.yieldNow, |
| 301 | collectWhile: constTrue, |
| 302 | runAll: options.resolver as any |
| 303 | }) |
| 304 | |
| 305 | const hashGroupKey = <A, K>(get: (entry: Request.Entry<A>) => K) => { |
| 306 | const groupKeys = MutableHashMap.empty<K, K>() |
nothing calls this directly
no test coverage detected