Used first code snippets from ClearURLs v2: https://gitlab.com/ClearURLs/core/-/blob/master/src/utils/URLHashParams.ts
This commit is contained in:
Kevin R
2022-07-27 00:28:15 +02:00
parent 0f08b0f7e3
commit 0d7381f02a
7 changed files with 246 additions and 6 deletions

21
core_js/utils/Multimap.d.ts vendored Normal file
View File

@@ -0,0 +1,21 @@
/**
* Models a multimap backed by a {@link Set}.
*/
export default class Multimap<K, V> implements Iterable<[K, V]> {
private _map;
private _size;
constructor();
get size(): number;
get(key: K): Set<V>;
put(key: K, value: V): boolean;
has(key: K): boolean;
hasEntry(key: K, value: V): boolean;
delete(key: K): boolean;
deleteEntry(key: K, value: V): boolean;
clear(): void;
entries(): IterableIterator<[K, V]>;
values(): IterableIterator<V>;
keys(): IterableIterator<K>;
forEach<T>(callback: (this: T | this, key: K, value: V, map: this) => void, thisArg?: T): void;
[Symbol.iterator](): IterableIterator<[K, V]>;
}