DefinitelyTyped/types/flatbush/flatbush-tests.ts
Nathan Shively-Sanders d2de259df2
Flatbush uses export= (#44838)
* Flatbush uses export=

Previously, it incorrectly used `export default`.

* fix geoflatbush tests
2020-05-18 09:59:25 -07:00

11 lines
265 B
TypeScript

import Flatbush = require('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);