import { LookupKeyType } from './utils';
interface BaseOptions<K extends LookupKeyType, V> {
    valueFactory: (key: K) => Promise<V>;
    isCacheableValue?: (value: V) => boolean;
}
interface CacheMapOptions<K extends LookupKeyType, V> extends BaseOptions<K, V> {
    maxSize: number;
    maxAge?: number;
}
type LazyMapOptions<K extends LookupKeyType, V> = BaseOptions<K, V>;
export declare class Mapping<K extends LookupKeyType, V> {
    private readonly delegate;
    private readonly pendingPromises;
    private readonly opts;
    get(key: K): Promise<V>;
    set(key: K, value: V): void;
    invalidate(predicate: (key: K) => boolean): void;
    values(): IterableIterator<V>;
}
export declare const createCacheMap: <K extends LookupKeyType, V>(opts: CacheMapOptions<K, V>) => Mapping<K, V>;
export declare const createLazyMap: <K extends LookupKeyType, V>(opts: LazyMapOptions<K, V>) => Mapping<K, V>;
export {};
