turf
turf copied to clipboard
Several modules not exported in index.d.ts
I'm using @turf/turf with version 6.5.0. It seems that several modules are not exported in index.d.ts, such as : booleanConcave,booleanIntersects.
Although they are indeed exported in "@turf/turf/dist/es/index.js" and "@turf/turf/dist/js/index.js",thus they can be actually imported and used in production mode.Still,the IDE can not find them during development mode, which may result in confusion for developers.
Would you please add export statement "booleanConcave","booleanIntersects" in index.d.ts? Thanks a lot.
Thanks for raising
booleanIntersects looks like it's currently in there https://github.com/Turfjs/turf/blob/cd31582faddc15552994c095411f5623378c6874/packages/turf/index.d.ts
booleanConcave seems to be missing, I've raised a PR for it.
Thanks for raising
booleanIntersects looks like it's currently in there https://github.com/Turfjs/turf/blob/cd31582faddc15552994c095411f5623378c6874/packages/turf/index.d.ts
booleanConcave seems to be missing, I've raised a PR for it.
Thanks for reply. I've tried "npm i @turf/turf@latest" in new created project, the version in package.json is indeed 6.5.0. But my index.d.ts is quite different from index.d.ts in github repo, I don't know why. index.d.zip
@meatjam what's on GitHub isn't what gets published to npm. You'll most likely seen the changes in 7.0.0
ok, I'll stay tuned.
I'm not sure why but I'm also not seeing booleanIntersects in my IDE with version 6.5.0 when using Yarn 3.2.3.
Quick workaround:
-import { booleanIntersects } from '@turf/turf';
+import booleanIntersects from '@turf/boolean-intersects';
I'm not sure why but I'm also not seeing
booleanIntersectsin my IDE with version 6.5.0 when using Yarn 3.2.3.Quick workaround:
-import { booleanIntersects } from '@turf/turf'; +import booleanIntersects from '@turf/boolean-intersects';
Tried this with no luck. @JamesLMilner You said you have a PR for this?
I'm not sure why but I'm also not seeing
booleanIntersectsin my IDE with version 6.5.0 when using Yarn 3.2.3. Quick workaround:-import { booleanIntersects } from '@turf/turf'; +import booleanIntersects from '@turf/boolean-intersects';Tried this with no luck. @JamesLMilner You said you have a PR for this?
Have you tried installing it first?
npm install @turf/boolean-intersects
and then import it
import booleanIntersects from '@turf/boolean-intersects';
It worked for me.
It seems like the version 6.5.0 doesn't include booleanIntersects and we have to install this module separately. Also including a line
export { default as booleanIntersects } from '@turf/boolean-intersects';
in index.d.ts doesn't change anything.