[editable-layers] Update to turf 7 and use geojson types#221
[editable-layers] Update to turf 7 and use geojson types#221timnyborg wants to merge 5 commits intovisgl:masterfrom
Conversation
|
|
||
| export type BoundingBoxArray = [number, number, number, number]; | ||
| import { Feature, FeatureCollection } from 'geojson'; | ||
| export { Feature, FeatureCollection } from 'geojson'; |
There was a problem hiding this comment.
Probably want to drop this export, and have all files import directly from geojson instead - this was a quick way to make the switch.
|
@timnyborg id like to see this land before integrating the editable-layers into my repo. What additional work is required here? |
|
@charlieforward9 as far as I'm concerned, none, as this is passing the test suite for me. It's really a question for the repo owners, though. Note that you can use this library with turf@7, which is almost entirely backwards-compatible with v6, just with the odd type assertion around |
|
That's fantastic to hear. In this case, let's see if @ibgreen can review and land it! I'm eager to get editable layers as up to date and functional as possible as I have 2 projects depending on it |
|
@timnyborg I just got granted write access to this repo! If you are still interested in landing this, having it updated and verified would be a huge help. I am working through all the editable-layer PR's and issues and working to get them into production in the coming weeks. Your work is highly valued! |
charlieforward9
left a comment
There was a problem hiding this comment.
@timnyborg, let me know if you can update this. Otherwise, Ill add it to my TODOs. Thank you
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.
FeatureandFeatureCollectiontypes withgeojson's, narrowing to excludeGeometryCollection(which is unsupported)FeatureCollectioninputs (intersect, difference, etc.) or return aFeature(centroid)@turf/areats-expect-errors. Leaves a few type assertions in place to avoid additional functional changes, but the type safety is much improvedlibfolder, and an unusedcurve-utilsfile, 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