sonic-forest
Version:
High-performance (binary) tree and sorted map implementation (AVL, Splay, Radix, Red-Black)
16 lines (15 loc) • 651 B
TypeScript
import { Slice } from './Slice';
import { Printable } from '../print/types';
import type { ITreeNode } from '../types';
export declare class BinaryTrieNode<V = unknown> implements ITreeNode<Slice, unknown>, Printable {
k: Slice;
v: V;
p: BinaryTrieNode<V> | undefined;
l: BinaryTrieNode<V> | undefined;
r: BinaryTrieNode<V> | undefined;
children: BinaryTrieNode<V> | undefined;
constructor(k: Slice, v: V);
forChildren(callback: (child: BinaryTrieNode<V>, index: number) => void): void;
toRecord(prefix?: Uint8Array, record?: Record<string, unknown>): Record<string, unknown>;
toString(tab?: string): string;
}