index.d.ts 851 B

12345678910111213141516171819
  1. import { BBox, Feature, FeatureCollection, Geometry, GeoJsonProperties } from 'geojson'
  2. declare class RBush<G extends Geometry, P extends GeoJsonProperties> {
  3. insert(feature: Feature<G, P>): RBush<G, P>;
  4. load(features: FeatureCollection<G, P> | Feature<G, P>[]): RBush<G, P>;
  5. remove(feature: Feature<G, P>, equals?: (a: Feature<G, P>, b: Feature<G, P>) => boolean): RBush<G, P>;
  6. clear(): RBush<G, P>;
  7. search(geojson: Feature<G, P> | FeatureCollection<G, P> | BBox): FeatureCollection<G, P>;
  8. all(): FeatureCollection<any>;
  9. collides(geosjon: Feature<G, P> | FeatureCollection<G, P> | BBox): boolean;
  10. toJSON(): any;
  11. fromJSON(data: any): RBush<G, P>;
  12. }
  13. /**
  14. * https://github.com/mourner/rbush
  15. */
  16. export default function rbush<G extends Geometry = Geometry, P = GeoJsonProperties>(maxEntries?: number): RBush<G, P>;