@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
24 lines • 1 kB
TypeScript
export interface IndexNode<T> {
readonly key: string;
readonly value: T;
readonly left: IndexNode<T> | undefined;
readonly right: IndexNode<T> | undefined;
readonly height: number;
readonly size: number;
live: number;
pins: number;
}
/** Resident membership/path headers only; immutable values have their own spillable ownership. */
export declare class CompactIndexTree<T> {
residentNodes: number;
allocatedNodes: number;
private readonly retain;
constructor(retain: (value: T, live: number, pins: number) => void);
get(root: IndexNode<T> | undefined, key: string): T | undefined;
adjust(root: IndexNode<T> | undefined, live: number, pins: number): void;
set(root: IndexNode<T> | undefined, key: string, value: T | undefined): IndexNode<T> | undefined;
entries(root: IndexNode<T> | undefined, after?: string): IterableIterator<readonly [string, T]>;
private make;
private balance;
}
//# sourceMappingURL=compact-index-tree.d.ts.map