-
-
Notifications
You must be signed in to change notification settings - Fork 92
/
trie-map.d.ts
30 lines (26 loc) · 773 Bytes
/
trie-map.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* Mnemonist TrieMap Typings
* ==========================
*/
export default class TrieMap<K, V> implements Iterable<[K, V]> {
// Members
size: number;
// Constructor
constructor(Token?: new () => K);
// Methods
clear(): void;
set(prefix: K, value: V): this;
update(prefix: K, updateFunction: (oldValue: V | undefined) => V): this
get(prefix: K): V;
delete(prefix: K): boolean;
has(prefix: K): boolean;
find(prefix: K): Array<[K, V]>;
values(): IterableIterator<V>;
prefixes(): IterableIterator<K>;
keys(): IterableIterator<K>;
entries(): IterableIterator<[K, V]>;
[Symbol.iterator](): IterableIterator<[K, V]>;
inspect(): any;
// Statics
static from<I, J>(iterable: Iterable<[I, J]> | {[key: string]: J}): TrieMap<I, J>;
}