export type Heap<T> = {
    value: T;
    left?: Heap<T> | null;
    right?: Heap<T> | null;
    parent?: Heap<T> | null;
};
export declare function bffHeap<T>(heap: Heap<T>, callback: (heap: Heap<T>) => void, queue?: Heap<T>[]): void;
export declare function findInsertionPoint<T>(heap: Heap<T>): any;
export declare function findLastLeaf<T>(heap: Heap<T>): any;
export declare function traverseHeap<T>(heap: Heap<T>, callback: (value: T) => void): void;
export declare function toArray<T>(heap: Heap<T>): T[];
export declare function toSortedArray<T>(heap: Heap<T>, predicate: (a: T, b: T) => boolean): T[];
export declare function asyncToSortedArray<T>(heap: Heap<T>, predicate: (a: T, b: T) => Promise<boolean>): Promise<T[]>;
export declare function parentHeap<T>(heap: Heap<T>, parent?: Heap<T> | null): Heap<T>;
export declare function readHeap<T>(heap: Heap<T>): Heap<T>;
export declare function removeHeapNode<T>(heap: Heap<T>, predicate: (a: T, b: T) => boolean): Heap<T> | null;
export declare function asyncRemoveHeapNode<T>(heap: Heap<T>, predicate: (a: T, b: T) => Promise<boolean>): Promise<Heap<T> | null>;
export declare function bubbleDown<T>(root: Heap<T>, predicate: (a: T, b: T) => boolean): any;
export declare function asyncBubbleDown<T>(root: Heap<T>, predicate: (a: T, b: T) => Promise<boolean>): Promise<any>;
export declare function bubbleUp<T>(child: Heap<T>, predicate: (a: T, b: T) => boolean): Heap<T>;
export declare function asyncBubbleUp<T>(child: Heap<T>, predicate: (a: T, b: T) => Promise<boolean>): Promise<Heap<T>>;
export declare function addHeapNode<T>(root: Heap<T> | null, child: Heap<T>, predicate: (a: T, b: T) => boolean): Heap<T>;
export declare function asyncAddHeapNode<T>(root: Heap<T> | null, child: Heap<T>, predicate: (a: T, b: T) => Promise<boolean>): Promise<Heap<T>>;
export declare function setHeapNode<T>(heap: Heap<T>, newValue: T, predicate: (a: T, b: T) => boolean): Heap<T> | null;
export declare function findRoot<T>(node: Heap<T>): Heap<T>;
