Thomas Hervey 14f354ffca
Typescript-ifying turf-great-circle (#2733)
* 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>
2025-12-08 08:47:38 -05:00
2024-08-08 11:23:46 -04:00
2017-12-21 16:24:31 -05:00
2025-12-06 09:57:58 -05:00
2025-12-06 09:57:58 -05:00
2024-08-08 11:23:46 -04:00
2025-11-27 17:43:27 +11:00
2025-12-06 09:57:58 -05:00

turf

GitHub Actions Status Version Badge Gitter chat Backers on Open Collective Sponsors on Open Collective Coverage Status

A modular geospatial engine written in JavaScript

Turf is a JavaScript library for spatial analysis. It includes traditional spatial operations, helper functions for creating GeoJSON data, and data classification and statistics tools. Turf can be added to your website as a client-side module, or you can run Turf server-side with Node.js (see below).

Getting Started

Read our getting started guide to begin working with Turf.

Or explore the Turf API and examples at turfjs.org.

Runtime support

Turf is currently published to work with any reasonably modern Javascript runtime.

Node is a first class citizen, and we recommend using an Active or Maintenance LTS release.

Other runtimes, such as Deno or Bun, are not officially supported. We would be very interested to hear your experiences though.

Browser support

Turf uses Babel to transpile to a JavaScript version usable by most modern browsers. Any browser that matches the following criteria as defined by Browserslist:

> 0.25%, last 2 versions, fully supports es5, not dead

Contributors

This project exists thanks to all the people who contribute. If you are interested in helping, check out the Contributing Guide.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

Description
A modular geospatial engine written in JavaScript
Readme MIT 78 MiB
Languages
TypeScript 87.8%
JavaScript 12.2%