7 Commits

Author SHA1 Message Date
James Beard
e7227f51b7
Preliminary improvements to documentation, esp internal types e.g. Units (#2727)
* Added JSDoc for internal types and constants e.g. Unts and earthRadius. Minimal other changes to bring JSDoc types into line with code types. Added GeoJsonProperties to documentation.yml for type linking.

* Generated README.md files based on updated source that now includes JSDoc for internal types and constants e.g. Units. Also synced up some out of data JSDoc types with what is in the code.

* Switched the structure of documentation.yml to be more traditionally nested. We'll use this new structure from the turf-www repo to generate the website documentation in a more robust manner.

* For some reason leaving this function documented as the default (geojsonRbush) causes @turf/turf last-checks to fail. Specifically defining it as rbush like it used to be, except with the @function tag rather than @name.
2024-10-11 12:56:42 +11:00
James Beard
d83e5801ac
Convert tests to Typescript, change require to import, and add named exports to modules (#2550)
* Converting bench.js and test.js to Typescript. Adding along as a named export as well as the default.

* Converting bench.js and test.js to Typescript and ESM import. Adding angle as a named export as well as the default.

* Converting bench.js and test.js to Typescript and ESM import. Adding area as a named export as well as the default.

* Making turf last-checks a bit more flexible as we will have a mix of JS and TS test files for a while.

* Converting bench.js and test.js to Typescript and ESM import, and adding named exports as well as the default export for modules:

bbox
bboxCliip
bboxPolygon
bearing
bezierSpline
booleanClockwise
booleanConcave
booleanContains
booleanCrosses
booleanDisjoint
booleanEqual
booleanIntersect
booleanOverlap
booleanParallel
booleanPointInPolygon
booleanPointOnLine
booleanTouches
booleanValid
booleanWithin

* Converting bench.js and test.js to Typescript and ESM import for remaining Typescript modules. Also adding named exports in addition to the default export for those same modules.

* Proceeding with migrating remaining tests to Typescript. Still a few to do - waiting for PR #2543 to merge first to avoid conflicts.

* Converting bench.js and test.js to Typescript and ESM import for some more Typescript modules (postponed until recent PRs merged). Also adding named exports in addition to the default export for those same modules.

* Banishing a couple more require() calls from module code.

* Retiring custom rollup typescript plugin. Problem it was designed to address probably fixed by a previous typescript upgrade. Removing redundant es5 checking script that hasn't been used for a while as well.
2023-12-05 19:04:54 +11:00
Tim Welch
d72985ce1a
Migrate to @types/geojson package (#2158)
* migrate to geojson types package

* strip geojson further

* migrate geojson type imports

* migrate more geojson type imports

* bump to geojson-rbush 3.2.0 and add line-overlap fix

* few more type migrations

* migrate to new internal es5 @turf/geojson-rbush

* migrate buffer to geojson types

* fix convertLength import
2021-10-24 23:07:07 -07:00
mfedderly
2e9d3d51f7
Add Prettier and ESLint to the builds (#1965)
* Configure ESlint and Prettier
- Disable all eslint rules that trigger
- Build's lint step now runs monorepoint, prettier, and eslint
- Remove all tslint references

* [auto] run prettier on everything

Co-authored-by: Matt Fedderly <mfedderly@palantir.com>
2020-12-08 19:24:15 -05:00
Denis
cc363e870f Update Boolean modules to strict Types 2018-03-21 13:21:14 -04:00
Denis
105d5ecd83 Add concave, contains, point in polygon 2018-02-03 22:43:34 -05:00
Denis
659231dbfa Convert clockwise to typescript 2018-02-03 22:25:39 -05:00