bpmn-io / path-intersection

Computes the intersection between two SVG paths.
https://www.npmjs.com/package/path-intersection
MIT License
106 stars 9 forks source link

fix: types declaration file matches implementation #23

Closed apademide closed 7 months ago

apademide commented 8 months ago

I saw the package has recently been switched to ESModule which is great.

The new implementation is export default function findPathIntersections(...), but the .d.ts declaration is still as export = findPathIntersections which causes issues with TypeScript, as importing the default export is not recognised despite being correct. This PR amends this.

Still in the topic of TypeScript issues, keeping the lib's interfaces private causes ts(4023) Exported variable 'X' has or is using name 'Intersection' from external module "Y" but cannot be named.. I had to lookup this one but the fix here is just to export the interface, allowing other modules to reference, or name, the used types.

Thanks for that useful lib!

CLAassistant commented 8 months ago

CLA assistant check
All committers have signed the CLA.

nikku commented 7 months ago

Released with v3.1.0