@metreeca/keep
    Preparing search index...

    Type Alias Handler<R>

    Handler: (batch: readonly Deferred<R>[], broker: Broker) => Promise<void>

    Batch handler for a single request type.

    Supplied by the connector to createBatchingStore, one per request type. A handler receives every request of its type accumulated since the previous batch, together with a Broker for issuing nested requests. It settles each Deferred in the batch with its result or error. The returned promise must resolve only once every request in the batch has settled, including any nested requests issued through the broker.

    Batches are never empty, so handlers need not guard against an empty one.

    Type Parameters

    • R extends Request

      The request variant handled

    Type Declaration