import type { CacheMetadata, GetFreshValue, GetFreshValueContext } from './common'; type OnValueCallback = (context: GetFreshValueContext & { value: Value; }) => void; export type AddFn = (param: Param, onValue?: OnValueCallback) => GetFreshValue; export type GetFreshValues = (params: Param[], metadata: CacheMetadata[]) => Value[] | Promise; export declare function createBatch(getFreshValues: GetFreshValues, autoSubmit: false): { submit: () => Promise; add: AddFn; }; export declare function createBatch(getFreshValues: GetFreshValues): { add: AddFn; }; export declare class Deferred { readonly promise: Promise; readonly resolve: (value: Value | Promise) => void; readonly reject: (reason: unknown) => void; constructor(); } export {};