/** * A Map that holds at most `max` entries and drops the least recently used one * past that. Reading an entry counts as using it. `onEvict` is handed what is * dropped, for a cache whose values hold GPU memory. */ export declare class LruMap extends Map { private readonly max; private readonly onEvict?; constructor(max: number, onEvict?: ((value: V, key: K) => void) | undefined); get(key: K): V | undefined; set(key: K, value: V): this; } /** Keeps `value` as one variant of `key`, such as one flatness a path is traced at. */ export declare function setVariant(cache: LruMap>, key: string, variant: string, value: V): void;