/** * Acts as an enhanced version of the Map class with new features and changed behavior for convenience * * @typeParam K - the type of keys to store use to store values * @typeParam V - the type of values to store * */ declare class Manager { /** For backward compatability and performance reasons Manager use Map to store data */ protected map: Map; constructor(value?: Array<[K, V]>); /** Returns the Manager classes base Map */ getMap(): Map; /** Get a value stored in the Manager */ get(key: K): V | undefined; /** Returns the keys of all items stored in the Manager as an Array */ keys(): Array; /** Returns the values of all items stored in the Manager as an Array */ values(): Array; /** Set a value to the Manager using a key */ set(key: K, value: V): Manager; /** Adds a value to Manager, and uses the current size of the Manager as it's key, it works best when all the key in the Manager are numbers */ add(value: V): Manager; /** Returns the total number of items stored in the Manager */ get size(): number; /** An alias for size */ get length(): number; /** Returns the last item in the Manager who's index is a certain distance from the last item in the Manager */ last(distance?: number): V | undefined; /** Removes a value stored in the Manager via a key, returns true if an element in the Map object existed and has been removed, or false if the element does not exist */ delete(key: K): boolean; /** Removes a value stored in the Manager via a key, returns the Manager class, allowing for chains */ remove(key: K): Manager; /** Clear the Manager of all its contents */ clear(): Manager; /** Checks if the Manager contains a certain key */ has(key: K): boolean; /** Returns a new Iterator object that contains an array of [key, value] for each element in the Map object in insertion order. */ entries(): IterableIterator<[K, V]>; /** Iterates through the Managers contents, calling a callback function every iteration */ forEach(callback: (value?: V, key?: K, map?: Map) => void, context?: object): Manager; /** Allows for iteration via for..of, learn more: [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators] */ [Symbol.iterator](): IterableIterator<[K, V]>; } /** * Calls the method of a certain name for all items in the Map */ declare function methodCall(manager: Manager, method: string, ...args: any): void; export { Manager, Manager as default, methodCall };