(options: {
readonly batchKey: (request: Request.Entry<A>) => unknown
readonly preCheck?: ((entry: Request.Entry<A>) => boolean) | undefined
readonly delay: Effect.Effect<void>
readonly collectWhile: (requests: ReadonlySet<Request.Entry<A>>) => boolean
readonly runAll: (entries: NonEmptyArray<Request.Entry<A>>, key: unknown) => Effect.Effect<void, Request.Error<A>>
})
| 179 | * @see {@link makeGrouped} for constructing a resolver that groups requests by key |
| 180 | * |
| 181 | * @category constructors |
| 182 | * @since 4.0.0 |
| 183 | */ |
| 184 | export const makeWith = <A extends Request.Any>(options: { |
| 185 | readonly batchKey: (request: Request.Entry<A>) => unknown |
| 186 | readonly preCheck?: ((entry: Request.Entry<A>) => boolean) | undefined |
| 187 | readonly delay: Effect.Effect<void> |
| 188 | readonly collectWhile: (requests: ReadonlySet<Request.Entry<A>>) => boolean |
| 189 | readonly runAll: (entries: NonEmptyArray<Request.Entry<A>>, key: unknown) => Effect.Effect<void, Request.Error<A>> |
| 190 | }): RequestResolver<A> => { |
| 191 | const self = Object.create(RequestResolverProto) |
| 192 | self.batchKey = options.batchKey |
| 193 | self.preCheck = options.preCheck |
| 194 | self.delay = options.delay |
| 195 | self.collectWhile = options.collectWhile |
| 196 | self.runAll = options.runAll |
| 197 | return self |
| 198 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…