Skip to content
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

Fix TypeScript strict mode typing errors for turf-polygonize and turf-clusters-dbscan #2109

Conversation

JamesLMilner
Copy link
Collaborator

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Have read How To Contribute.
  • Run npm test at the sub modules where changes have occurred.
  • Run npm run lint to ensure code style at the turf module level.

Fixes TypeScript errors in the turf-polygonize and turf-clusters-dbscan packages. This should resolve the issue people were seeing with turf-dbscan on install when they have TypeScript strict mode on in their project (#2017)

@@ -205,7 +207,7 @@ export default class Graph {

if (de.label === label) outDE = de;

if (sym.label === label) inDE = sym;
if (((sym as Edge).label as number) === label) inDE = sym;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like using as across the code here but I wanted to change the logic as little as possible whilst still fixing the TypeScript issues

@JamesLMilner JamesLMilner changed the title Fix strict typing errors for polygonize and dbscan Fix TypeScript strict mode typing errors for turf-polygonize and turf-clusters-dbscan Jun 20, 2021
@JamesLMilner JamesLMilner force-pushed the typescript-clusters-polygonize branch from 1afb200 to fd85627 Compare June 20, 2021 14:51
@JamesLMilner
Copy link
Collaborator Author

Favour #2126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant