Use typescript types for RBush

The `toJSON` function simply returns the `data` property.
See: https://github.com/mourner/rbush/blob/v2.0.2/index.js#L184
This commit is contained in:
Frederic Junod
2018-10-24 17:02:38 +02:00
parent 208f125158
commit 1f1951f3cc
2 changed files with 2 additions and 2 deletions

View File

@@ -221,8 +221,7 @@ class RBush {
* @return {import("../extent.js").Extent} Extent.
*/
getExtent(opt_extent) {
// FIXME add getExtent() to rbush
const data = this.rbush_.data;
const data = this.rbush_.toJSON();
return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, opt_extent);
}