UNPKG

@sanity/util

Version:

Utilities shared across projects of Sanity

8 lines 440 B
import { SanityClient } from "@sanity/client"; /** * Decorates a sanity client to limit the concurrency of `client.fetch` * requests. Keeps the concurrency limit state and returns wrapped clients with * that same state if the `clone` `config` or `withConfig` methods are called. */ declare function createClientConcurrencyLimiter(maxConcurrency: number): (input: SanityClient) => SanityClient; export { createClientConcurrencyLimiter };