UNPKG

sonic-forest

Version:

High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)

8 lines (7 loc) 663 B
import { BinaryTrieNode } from './BinaryTrieNode'; export declare const insert: (root: BinaryTrieNode, path: Uint8Array, value: unknown) => number; export declare const find: (node: BinaryTrieNode, key: Uint8Array) => undefined | BinaryTrieNode; export declare const findWithParents: (node: BinaryTrieNode, key: Uint8Array) => undefined | BinaryTrieNode[]; export declare const remove: (root: BinaryTrieNode, key: Uint8Array) => boolean; export declare const toRecord: (node: BinaryTrieNode | undefined, prefix?: Uint8Array, record?: Record<string, unknown>) => Record<string, unknown>; export declare const print: (node: BinaryTrieNode, tab?: string) => string;