using
import booleanPointInPolygon from '@turf/boolean-point-in-polygon'
with typescript
I get
node_modules/@turf/boolean-point-in-polygon/index.d.ts:1:10 - error TS2305: Module '"@turf/helpers"' has no exported member 'Coord'.
import { Coord, Feature, MultiPolygon, Polygon, Properties } from "@turf/helpers";
using versions
"@turf/boolean-point-in-polygon": "^6.0.1",
"@turf/helpers": "^6.1.4",
@guyisra have you found any solution to this?
I used require and not import :/
Alternatively try and rollback to the version 5 releases, they were the last stable release.
I am having the same issue. In fact, so far, every geospatial lib I've tried to use fails with typescript...
Using require does not fix it for me
UPDATE:
Upgrading to typescript 3.2.2, and adding a declaration file for turf fixed it
Try removing @types/turf
Same here:
ERROR in node_modules/@turf/bearing/index.d.ts:1:10 - error TS2305: Module '"@turf/helpers"' has no exported member 'Coord'.
1 import { Coord } from "@turf/helpers";
using versions
"@turf/bearing": "^6.0.1",
"@turf/distance": "^6.0.1",
"@turf/helpers": "^6.1.4",
"@turf/turf": "^5.1.6",
Most helpful comment
Try removing
@types/turf