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 author to createBatchingStore, one per request type. Receives the whole batch the Broker has accumulated for this type, together with the broker for issuing nested requests, and settles each Deferred in the batch with its result or error. The returned promise must resolve only once every request the handler owns has settled, including any nested requests issued through the broker.

    The broker never dispatches an empty batch, so the handler need not guard against one.

    Type Parameters

    • R extends Request

      The request variant handled

    Type Declaration