mirror of
https://github.com/Turfjs/turf.git
synced 2025-12-08 20:26:16 +00:00
* Added typing to index.ts, tests to test.ts * Update pnpm-lock.yaml after dependency updates * Replace embedded arc.js with external TypeScript arc package - Add arc@^0.2.0 (WIP bump) as dependency to replace embedded lib/arc.js - Update import from './lib/arc.js' to 'arc' package - Fix TypeScript type compatibility issues: - Handle null properties with fallback to empty object - Add proper type assertion for return value - All tests pass (9/9) with new TypeScript arc.js integration - Maintains 100% backward compatibility while adding full TypeScript support * Remove arc.d.ts which is no longer needed, regenerate pnpm-lock --------- Co-authored-by: mfedderly <24275386+mfedderly@users.noreply.github.com>
16 lines
382 B
TypeScript
16 lines
382 B
TypeScript
import Benchmark from "benchmark";
|
|
import { point } from "@turf/helpers";
|
|
import { greatCircle } from "./index.js";
|
|
|
|
const point1 = point([-75, 45]);
|
|
const point2 = point([30, 45]);
|
|
|
|
const suite = new Benchmark.Suite("turf-great-circle");
|
|
|
|
suite
|
|
.add("greatCircle", () => {
|
|
greatCircle(point1, point2);
|
|
})
|
|
.on("cycle", (e: any) => console.log(String(e.target)))
|
|
.run();
|