infinity-map
Version:
A Map that doesn't throw if you put more than 16 million items in it. Because that's what the native `Map` object does for some reason.
18 lines (17 loc) • 589 B
TypeScript
declare class InfinityMap<K, V> {
private current;
private pool;
constructor(entries?: readonly (readonly [K, V])[]);
get size(): number;
clear(): undefined;
delete(key: K): boolean;
get(key: K): V | undefined;
has(key: K): boolean;
set(key: K, value: V): this;
[Symbol.iterator](): IterableIterator<[K, V]>;
keys(): IterableIterator<K>;
values(): IterableIterator<V>;
entries(): IterableIterator<[K, V]>;
forEach(callback: (value: V, key: K, map: InfinityMap<K, V>) => void, thisArg?: any): undefined;
}
export default InfinityMap;