I saw the package has recently been switched to ESModule which is great.
The new implementation is export default function findPathIntersections(...), but the .d.tsdeclaration 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.
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 asexport = 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!