/** This module is browser compatible. */ export * from "./_comparators"; /** * A priority queue implemented with a binary heap. The heap is in decending order by default, * using JavaScript's built in comparison operators to sort the values. */ export declare class BinaryHeap implements Iterable { private compare; private data; constructor(compare?: (a: T, b: T) => number); /** Creates a new binary heap from an array like or iterable object. */ static from(collection: ArrayLike | Iterable | BinaryHeap): BinaryHeap; static from(collection: ArrayLike | Iterable | BinaryHeap, options: { compare?: (a: T, b: T) => number; }): BinaryHeap; static from(collection: ArrayLike | Iterable | BinaryHeap, options: { compare?: (a: U, b: U) => number; map: (value: T, index: number) => U; thisArg?: V; }): BinaryHeap; /** The amount of values stored in the binary heap. */ get length(): number; /** Returns the greatest value in the binary heap, or undefined if it is empty. */ peek(): T | undefined; /** Removes the greatest value from the binary heap and returns it, or null if it is empty. */ pop(): T | undefined; /** Adds values to the binary heap. */ push(...values: T[]): number; /** Removes all values from the binary heap. */ clear(): void; /** Checks if the binary heap is empty. */ isEmpty(): boolean; /** Returns an iterator for retrieving and removing values from the binary heap. */ drain(): IterableIterator; [Symbol.iterator](): IterableIterator; }