import type { CacheSpec } from "../types/00_CacheSpec.js"; import type { NormalizedParams } from "../types/06_Normalization.js"; import type { Store, StoreGetManyResult } from "../types/06_Store.js"; import type { AnyParams, AnyValidators } from "../types/index.js"; import { components, type Logger } from "../types/index.js"; export type { JsonOf } from "type-party"; export { jsonParse, jsonStringify } from "type-party/runtime/json.js"; export declare const defaultLoggersByComponent: { [K in (typeof components)[number]]: Logger; }; /** * Preserves a type's tupleness during a map operation. */ export declare function mapTuple(arr: T, fn: (it: T[number]) => U): { [K in keyof T]: U; }; export declare function assertUnreachable(_it: never): never; /** * Races a promise against an AbortSignal. If the signal is already aborted or * becomes aborted before the promise settles, the returned promise rejects with * the signal's reason. The original promise is NOT cancelled (it continues * running); this only controls the caller's observation of the result. */ export declare function raceWithSignal(promise: Promise, signal: AbortSignal | undefined): Promise; /** * Faster, more-type-safe version of lodash's zip, just for pairs. * If the arrays are not the same length, the longer one will be truncated! * (That's what allows us to not have `undefined` in the result type.) */ export declare const zip2: (a: readonly T[], b: readonly U[]) => [T, U][]; /** * A naive implementation of the `getMany` method that uses the store's `get` * method to fulfill all requests with limited parallelism. * * This implementation is provided as a default fallback for stores that don't * implement their own optimized `getMany` method. It calls `store.get` for each * request with up to 10 concurrent operations to improve performance. * * @param store The store instance to use for retrieving entries * @param requests Array of requests, each containing an id and params * @param maxConcurrency Maximum number of concurrent requests (default: 10) * @returns A promise that resolves to a tuple-typed array, where each output * slot holds the matching entries for the corresponding input request, with * content narrowed to the spec variants compatible with that request's id. */ export declare function naiveGetMany>; }[]>(store: Store, requests: Reqs, maxConcurrency?: number, options?: { signal?: AbortSignal; }): Promise>; //# sourceMappingURL=utils.d.ts.map