DefinitelyTyped/types/flatbush/flatbush-tests.ts
mfedderly 9d0023e630 Add types for flatbush and geoflatbush packages (#37113)
* Add types for flatbush and geoflatbush packages

* Cleanup

* cleanup

* fix
2019-07-25 12:19:33 -07:00

11 lines
259 B
TypeScript

import Flatbush from 'flatbush';
const from: Flatbush = Flatbush.from(new ArrayBuffer(0));
const index = new Flatbush(1);
index.add(0, 0, 1, 1);
index.finish();
const results = index.search(0.5, 0.5, 0.5, 0.5);
const neighbors = index.neighbors(0.5, 0.5);