export declare const CompressedTrieValueKey: unique symbol; declare const PARENT: unique symbol; export declare const CompressedTrieLeafKey: unique symbol; export interface CompressedTrieNode { [key: string]: CompressedTrieNode | undefined; [PARENT]?: CompressedTrieNode; [CompressedTrieLeafKey]?: CompressedTrieNode; [CompressedTrieValueKey]?: T; } export default class CompressedTrie { private _size; root: CompressedTrieNode; constructor(); get size(): number; /** * Set a key in the trie to a value * @param key the key to set in the trie * @param value the value to set on the prefix */ set(key: string, value: T): void; /** * Get a value associated with a key in the trie or undefined if no * value is associated with the key. * @param key the key to get from the trie */ get(key: string): T | undefined; /** * Check to see if a key is contained in the trie * @param key the key to check in the trie */ has(key: string): boolean; /** * Empty the trie */ clear(): void; /** * Delete a key from the trie. Returns true if the key is in the trie. * @param key the key to delete in the trie */ delete(key: string): boolean; /** * Find all values in the trie which start with the prefix * @param prefix the prefix to search for in the trie. */ find(prefix: string): Generator; private nodeIsLeaf; /** * Traverse the trie as far as possible for the given key * @param key the search to traverse for * @returns the node traversed to, the prefix used to get to the node, the suffix left of the key */ private traverseForKey; } export {};