-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript errors in turf 6 (TS2304 and TS2312) #2017
Comments
Your typescript settings are likely more strict than Turf's. I'm hoping to enable all the strictness but in the meantime you might want to look into the https://www.typescriptlang.org/docs/handbook/compiler-options.html |
Thanks for the quick response. I looked into that but I have some custom declaration files in the project as well, that I do like to get checked. I'm not in a hurry, so I'll just hold off on updating for now. |
Hi @mfedderly, I have a similar issue. I also upgraded to 6.3 from 5.1, and I started to get ts 2322 (type assignment) erros. Could you please take a look? Thanks a lot for your time and effort! An example for those two types :
I tried to change the coveredAreaPolygon to Feature, I get the same error but but for Geometry object:
The same thing happens in other places, while trying to assign Feature<Polygon | MultiPolygon> to another Feature<Polygon | MultiPolygon>, and Feature to Feature.
|
Submitted PR (#2044). |
This is not fully resolved, since centerMedian method still misses Position type import (@turf/center-median/dist/js/index.d.ts). Tested with newest 6.3. version. @Seairth PR only partly resolves the problem. |
Have you tested with the Master branch? The PR was submitted after 6.3. A version including that PR has not yet been published to npm. |
My bad. I thought that that was already published (should have investigated further). |
@mfedderly When this fix will be released? Its blocking so many people to upgrade to latest version 6.3.0. |
…urf#2017 issue is not resolved Signed-off-by: Nisar, Naitik <naitik.nisar@here.com>
…urf#2017 issue is not resolved Signed-off-by: Nisar, Naitik <naitik.nisar@here.com>
when is this fix getting released? and until that what how far back does one have to go to find a version without this bug? |
I'm also anxiously awaiting a new release to NPM due to the typescript errors preventing the build in @angular/cli 12 |
I just updated to turf 6.4, but I still get one of them:
|
Yep still working on it. There's 5 packages that still need fixes. polygonize, clusters-kmeans, clusters-dbscan, boolean-equal, and boolean-overlap. Waiting on: |
I've updated @turf/turf from 5.1.6 to 6.3.0 and now TypeScript is complaining about the following when I transpile my project:
My tsconfig.json:
I just tried with 6.2.0 and that gives the same issue. For now, I've reverted back to 5.1.6
The text was updated successfully, but these errors were encountered: