export declare type HeapSpec<T, X = {}> = X & {
    value: T;
    children: HeapSpec<T, X>[];
};
export declare type Heap<T> = HeapSpec<T, {
    parent: Heap<T> | null;
}>;
export declare function traverseHeap<T>(heap: HeapSpec<T>, callback: (value: T) => void): void;
export declare function toArray<T>(heap: HeapSpec<T>): T[];
export declare function parentHeap<T>(heap: HeapSpec<T>, parent?: Heap<T> | null): Heap<T>;
export declare function readHeap<T>(heap: Heap<T>): HeapSpec<T>;
export declare function removeHeapNode<T>(heap: Heap<T>, predicate: (a: T, b: T) => boolean): Heap<T> | null;
export declare function addHeapNode<T>(root: Heap<T> | null, child: Heap<T>, predicate: (a: T, b: T) => boolean): Heap<T>;
export declare function setHeapNode<T>(heap: Heap<T>, newValue: T, predicate: (a: T, b: T) => boolean): Heap<T> | null;
export declare function refreshParent<T>(heap: Heap<T>, predicate: any): void;
export declare function findRoot<T>(node: Heap<T>): Heap<T>;
