@quinck/collections
Version:
Allows extra operations on JavaScript collections: Array, Map and Set.
23 lines (22 loc) • 671 B
TypeScript
export {};
declare global {
interface Map<K, V> {
/**
* Creates a new Array with all the elements of the Map.
* Each element of the new Array will be
* an Array with a Key and the relative Value.
* @returns an Array with the Map entries
*/
toArray(): Array<[K, V]>;
/**
* Creates a new Array with all the keys of the Map.
* @returns an Array with the Map keys
*/
keysArray(): Array<K>;
/**
* Creates a new Array with all the values of the Map.
* @returns an Array with the Map values
*/
valuesArray(): Array<V>;
}
}