Struggling with Turf.js's bbox functionality. Despite all my efforts, TypeScript type definitions remain elusive.
I attempted the following steps:
Included in package.json:
"dependencies": {
...
"@turf/turf": "6.5.0",
"vue": "^3.3.11",
...
},
Imported in a Vue file (utilizing Composition API and TypeScript):
<script setup lang="ts">
import * as turf from "@turf/turf";
...
</script>
Error encountered in TypeScript:
Could not find a declaration file for module '@turf/turf'. '/Users/.../node_modules/@turf/turf/dist/es/index.js' implicitly has an 'any' type.
Types are available at '/Users/.../node_modules/@turf/turf/index.d.ts', but they cannot be resolved when considering package.json "exports". The '@turf/turf' library may need to update its package.json or typings.ts(7016)