import type { StorageRepository } from "./repository/StorageRepository.js"; /** * Pre-fetches a list of file paths from the repository in parallel. * * Use this to warm the cache (e.g. CachedRepository + IndexedDBCacheProvider) * so that subsequent queries hit the cache instead of making HTTP requests. * * The manifest file can be generated by the CLI: * ```bash * npx staticql-gen-index config.json output/ --manifest * ``` * * Usage: * ```ts * import { prefetch } from "staticql/prefetch"; * * const manifest = await fetch("/staticql-manifest.json").then(r => r.json()); * await prefetch(repository, manifest); * ``` * * @param repository - The storage repository to fetch from (typically CachedRepository). * @param paths - Array of relative file paths to pre-fetch. * @param concurrency - Maximum number of concurrent fetches. Defaults to 6. */ export declare function prefetch(repository: StorageRepository, paths: string[], concurrency?: number): Promise;