/**
 * A binary heap implementation for efficient priority queue operations
 * Supports O(log n) insert and extract operations
 */
export declare class BinaryHeap<T> {
    private compareFn;
    private extractKey?;
    private heap;
    private keyMap?;
    constructor(compareFn: (a: T, b: T) => number, extractKey?: (item: T) => string);
    /**
     * Get the current size of the heap
     */
    get size(): number;
    /**
     * Check if the heap is empty
     */
    isEmpty(): boolean;
    /**
     * Peek at the top element without removing it
     */
    peek(): T | undefined;
    /**
     * Insert a new item into the heap
     * O(log n) time complexity
     */
    insert(item: T): void;
    /**
     * Extract the top element from the heap
     * O(log n) time complexity
     */
    extract(): T | undefined;
    /**
     * Extract an element that matches the predicate
     * O(n) time complexity for search, O(log n) for extraction
     */
    extractIf(predicate: (item: T) => boolean): T | undefined;
    /**
     * Extract an element by its key (if extractKey was provided)
     * O(log n) time complexity
     */
    extractByKey(key: string): T | undefined;
    /**
     * Check if a key exists in the heap
     * O(1) time complexity
     */
    hasKey(key: string): boolean;
    /**
     * Get all elements as an array (does not modify heap)
     * O(n) time complexity
     */
    toArray(): T[];
    /**
     * Clear the heap
     */
    clear(): void;
    /**
     * Extract element at specific index
     */
    private extractAt;
    /**
     * Bubble up element at given index to maintain heap property
     */
    private bubbleUp;
    /**
     * Bubble down element at given index to maintain heap property
     */
    private bubbleDown;
    /**
     * Swap two elements in the heap
     */
    private swap;
}
