type Index = number; type Revision = number; /** * This class keeps a linear array of values and a mapping between the key of the value and its index in the array. * It also allows to specify a `revision` for each value, so that always the most up-to-date value is kept. * It does not support removing values. */ export declare class IndexedMap { /** Mapping between keys and indexes */ private index; /** The linear array of values */ private array; /** * Stores a value. If a value with the same key already exists, it will keep the one with highest `revision` value. * @returns the index of the value in the array */ set(key: Key, value: Value, revision?: Revision): Index; /** @returns the index of the value with the given key */ getIndex(key: Key): Index | undefined; /** @returns the value with the given key */ getByIndex(idx: Index): Value | undefined; /** @returns the array containing all values */ get values(): Value[]; /** @returns the number of values stored */ get size(): number; } export {};