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 Polygon.cut return type in index.d.ts #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lukerob5
Copy link

@lukerob5 lukerob5 commented Jan 2, 2025

The correct type is Polygon which you can see in the tests in test/classes/polygon.js.

It looks like the return type was changed from Polygon[] to Polygon here b15e05d but never updated in the type definitions.

The workaround I'm using to deal with this (in my typescript project with flatten-js/core v1.6.2) is polygon.cut(multiline) as unknown as Flatten.Polygon

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.

2 participants