[editable-layers] Update to turf 7 and use geojson types #221
+785
−1,988
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt at updating editable-layers to rely on turf.js@7 to remove the type carnage that came from competing geojson, turf.js, and nebula.gl type definitions.
Feature
andFeatureCollection
types withgeojson
's, narrowing to excludeGeometryCollection
(which is unsupported)FeatureCollection
inputs (intersect, difference, etc.) or return aFeature
(centroid)@turf/area
ts-expect-error
s. Leaves a few type assertions in place to avoid additional functional changes, but the type safety is much improvedlib
folder, and an unusedcurve-utils
file, rather than trying to update turf usages there.Assuming the PR is otherwise acceptable, I'm unsure what other work might need to be done. Other modules in the repo specify turf 6.5, so we might want to update them as well (examples, examples-wip, react, website)
Addresses #202