@dolittle/sdk.artifacts
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
48 lines • 1.61 kB
TypeScript
/**
* Defines a primitive key that can be used in a {@link NestedMap}.
*/
export declare type PrimitiveKey = number | bigint | string | boolean;
/**
* Represents a {@link Map} that handles a set of primitive keys in a recursive structure.
*/
export declare class NestedMap<K extends PrimitiveKey[], V> implements Map<K, V> {
readonly depth: K['length'];
private readonly _map;
/**
* Initialises a new instance of the {@link NestedMap} class.
* @param {number} depth - The number of keys from this map and down.
*/
constructor(depth: K['length']);
/** @inheritdoc */
[Symbol.toStringTag]: string;
/** @inheritdoc */
get size(): number;
/** @inheritdoc */
has(key: K): boolean;
/** @inheritdoc */
get(key: K): V | undefined;
/** @inheritdoc */
set(key: K, value: V): this;
/** @inheritdoc */
delete(key: K): boolean;
/** @inheritdoc */
clear(): void;
/** @inheritdoc */
entries(): IterableIterator<[K, V]>;
/** @inheritdoc */
[Symbol.iterator](): IterableIterator<[K, V]>;
/** @inheritdoc */
keys(): IterableIterator<K>;
/** @inheritdoc */
values(): IterableIterator<V>;
/** @inheritdoc */
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void;
/**
* Gets the actual size of the internal map without recursing down into nested maps.
*/
protected get internalMapSize(): number;
private throwIfIncorrectNumberOfPrimitiveKeysProvided;
private get _maps();
private get _values();
}
//# sourceMappingURL=NestedMap.d.ts.map