export default RBush; export type Entry = import("rbush").BBox & { value: T; }; /** * @typedef {import("rbush").BBox & {value: T}} Entry * @template T */ /** * @classdesc * Wrapper around the RBush by Vladimir Agafonkin. * See https://github.com/mourner/rbush. * * @template {Object} T */ declare class RBush { /** * @param {number} [maxEntries] Max entries. */ constructor(maxEntries?: number); /** * @private * @type {RBush_>} */ private rbush_; /** * A mapping between the objects added to this rbush wrapper * and the objects that are actually added to the internal rbush. * @private * @type {Object>} */ private items_; /** * Insert a value into the RBush. * @param {import("../extent.js").Extent} extent Extent. * @param {T} value Value. */ insert(extent: import("../extent.js").Extent, value: T): void; /** * Bulk-insert values into the RBush. * @param {Array} extents Extents. * @param {Array} values Values. */ load(extents: Array, values: Array): void; /** * Remove a value from the RBush. * @param {T} value Value. * @return {boolean} Removed. */ remove(value: T): boolean; /** * Update the extent of a value in the RBush. * @param {import("../extent.js").Extent} extent Extent. * @param {T} value Value. */ update(extent: import("../extent.js").Extent, value: T): void; /** * Return all values in the RBush. * @return {Array} All. */ getAll(): Array; /** * Return all values in the given extent. * @param {import("../extent.js").Extent} extent Extent. * @return {Array} All in extent. */ getInExtent(extent: import("../extent.js").Extent): Array; /** * Calls a callback function with each value in the tree. * If the callback returns a truthy value, this value is returned without * checking the rest of the tree. * @param {function(T): R} callback Callback. * @return {R|undefined} Callback return value. * @template R */ forEach(callback: (arg0: T) => R): R | undefined; /** * Calls a callback function with each value in the provided extent. * @param {import("../extent.js").Extent} extent Extent. * @param {function(T): R} callback Callback. * @return {R|undefined} Callback return value. * @template R */ forEachInExtent(extent: import("../extent.js").Extent, callback: (arg0: T) => R): R | undefined; /** * @param {Array} values Values. * @param {function(T): R} callback Callback. * @return {R|undefined} Callback return value. * @template R * @private */ private forEach_; /** * @return {boolean} Is empty. */ isEmpty(): boolean; /** * Remove all values from the RBush. */ clear(): void; /** * @param {import("../extent.js").Extent} [extent] Extent. * @return {import("../extent.js").Extent} Extent. */ getExtent(extent?: import("../extent.js").Extent): import("../extent.js").Extent; /** * @param {RBush} rbush R-Tree. */ concat(rbush: RBush): void; } //# sourceMappingURL=RBush.d.ts.map