TypeErrors - using wrong geojson types with top-level turf package
See original GitHub issueHello!
I’ve imported your library in a Angular2 project and I get a lot of typescript errors related to typings.
Any ideas? The library works, but with those errors I cannot deploy.
All the errors:
C:/projects/my-app/node_modules/@turf/along/index.d.ts(7,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/along/index.d.ts(12,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/bbox-clip/index.d.ts(7,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/bbox-clip/index.d.ts(9,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/bbox-polygon/index.d.ts(6,39): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/bezier-spline/index.d.ts(7,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/bezier-spline/index.d.ts(12,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-clockwise/index.d.ts(7,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-contains/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-contains/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-crosses/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-crosses/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-disjoint/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-disjoint/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-equal/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-equal/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-overlap/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-overlap/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-parallel/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-parallel/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-point-in-polygon/index.d.ts(8,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-point-on-line/index.d.ts(8,17): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-within/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/boolean-within/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(24,77): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(24,134): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(25,92): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(25,149): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(26,77): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(26,139): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(27,92): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(27,154): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(28,34): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(28,59): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(28,146): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(29,34): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/buffer/index.d.ts(29,102): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/center-mean/index.d.ts(12,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/center-median/index.d.ts(12,39): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/center-median/index.d.ts(17,15): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/center-of-mass/index.d.ts(9,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/center/index.d.ts(11,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/centroid/index.d.ts(9,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/circle/index.d.ts(14,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clean-coords/index.d.ts(6,53): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters-dbscan/index.d.ts(9,38): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters-dbscan/index.d.ts(21,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters-kmeans/index.d.ts(8,38): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters-kmeans/index.d.ts(20,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters/index.d.ts(6,14): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters/index.d.ts(8,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters/index.d.ts(14,14): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters/index.d.ts(16,26): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters/index.d.ts(23,14): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/clusters/index.d.ts(25,47): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/collect/index.d.ts(7,15): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/collect/index.d.ts(8,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/collect/index.d.ts(11,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/combine/index.d.ts(15,36): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/combine/index.d.ts(16,36): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/combine/index.d.ts(17,36): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/combine/index.d.ts(18,36): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/combine/index.d.ts(18,61): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/concave/index.d.ts(7,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/concave/index.d.ts(12,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/convex/index.d.ts(11,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/destination/index.d.ts(6,39): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/difference/index.d.ts(7,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/difference/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/difference/index.d.ts(9,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/dissolve/index.d.ts(7,24): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/dissolve/index.d.ts(11,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/ellipse/index.d.ts(15,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/envelope/index.d.ts(8,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/explode/index.d.ts(9,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(16,65): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(16,78): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(16,105): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(17,75): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(17,88): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(17,115): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(18,69): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(18,82): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(18,109): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/flatten/index.d.ts(19,48): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/great-circle/index.d.ts(14,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(17,21): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(25,26): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(25,36): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(39,68): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(44,57): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(45,45): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(45,88): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(61,25): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(66,26): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(71,27): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(76,28): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(81,30): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(86,31): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(92,35): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(97,30): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(102,32): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/index.d.ts(107,38): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,28): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,39): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,41): error TS2304: Cannot find name 'GeometryCollection'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,61): error TS2304: Cannot find name 'P'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,65): error TS2304: Cannot find name 'Properties'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,77): error TS1109: Expression expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,85): error TS2304: Cannot find name 'GeoJSONObject'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(213,99): error TS1005: ';' expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(214,5): error TS7028: Unused label.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(215,5): error TS7028: Unused label.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(215,15): error TS2304: Cannot find name 'G'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(220,5): error TS2304: Cannot find name 'id'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(220,8): error TS1109: Expression expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(220,10): error TS2304: Cannot find name 'Id'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(224,5): error TS7028: Unused label.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(224,17): error TS2304: Cannot find name 'P'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,38): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,49): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,51): error TS2304: Cannot find name 'GeometryCollection'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,71): error TS2304: Cannot find name 'P'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,75): error TS2304: Cannot find name 'Properties'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,87): error TS1109: Expression expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,95): error TS2304: Cannot find name 'GeoJSONObject'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(236,109): error TS1005: ';' expected.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(237,5): error TS7028: Unused label.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(237,29): error TS2304: Cannot find name 'G'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(237,32): error TS2304: Cannot find name 'P'.
C:/projects/my-app/node_modules/@turf/helpers/lib/geojson.d.ts(237,35): error TS1005: '(' expected.
C:/projects/my-app/node_modules/@turf/hex-grid/index.d.ts(6,35): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/hex-grid/index.d.ts(13,16): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/interpolate/index.d.ts(7,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/interpolate/index.d.ts(15,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/interpolate/index.d.ts(17,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/interpolate/index.d.ts(25,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/intersect/index.d.ts(7,12): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/intersect/index.d.ts(8,12): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/intersect/index.d.ts(9,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(16,31): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(21,32): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(31,36): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(36,49): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(46,60): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(47,51): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(48,34): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(49,34): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(54,34): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(55,34): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/invariant/index.d.ts(55,59): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/isobands/index.d.ts(7,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/isobands/index.d.ts(14,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/isolines/index.d.ts(7,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/isolines/index.d.ts(14,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/kinks/index.d.ts(15,16): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/kinks/index.d.ts(16,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-arc/index.d.ts(15,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-chunk/index.d.ts(14,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-chunk/index.d.ts(14,27): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-chunk/index.d.ts(14,74): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-chunk/index.d.ts(20,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-intersect/index.d.ts(15,12): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-intersect/index.d.ts(15,25): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-intersect/index.d.ts(16,12): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-intersect/index.d.ts(16,25): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-intersect/index.d.ts(17,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-offset/index.d.ts(7,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-offset/index.d.ts(12,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-overlap/index.d.ts(9,13): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-overlap/index.d.ts(10,13): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-overlap/index.d.ts(14,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-segment/index.d.ts(16,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-segment/index.d.ts(16,27): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-segment/index.d.ts(16,54): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-segment/index.d.ts(17,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-slice-along/index.d.ts(7,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-slice-along/index.d.ts(13,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-slice/index.d.ts(9,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-slice/index.d.ts(10,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-split/index.d.ts(12,24): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-split/index.d.ts(18,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-split/index.d.ts(20,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-to-polygon/index.d.ts(18,12): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-to-polygon/index.d.ts(24,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-to-polygon/index.d.ts(32,12): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-to-polygon/index.d.ts(32,56): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/line-to-polygon/index.d.ts(38,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/mask/index.d.ts(7,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/mask/index.d.ts(7,24): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/mask/index.d.ts(8,12): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/mask/index.d.ts(9,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(50,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(50,29): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(50,54): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(58,51): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(69,76): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(80,53): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(94,73): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(108,50): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(120,76): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(132,31): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(132,47): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(142,54): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(156,31): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(168,51): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/meta/index.d.ts(181,28): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/midpoint/index.d.ts(9,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/nearest-point-on-line/index.d.ts(3,45): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/nearest-point-on-line/index.d.ts(16,11): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/nearest-point/index.d.ts(3,39): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/nearest-point/index.d.ts(16,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/planepoint/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/point-grid/index.d.ts(6,37): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/point-grid/index.d.ts(12,16): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/point-on-feature/index.d.ts(8,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/points-within-polygon/index.d.ts(7,13): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/points-within-polygon/index.d.ts(7,30): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/points-within-polygon/index.d.ts(8,15): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/points-within-polygon/index.d.ts(8,28): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/points-within-polygon/index.d.ts(9,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygon-tangents/index.d.ts(8,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygon-tangents/index.d.ts(9,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygon-to-line/index.d.ts(17,68): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/polygon-to-line/index.d.ts(18,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygon-to-line/index.d.ts(29,68): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/polygon-to-line/index.d.ts(30,14): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygon-to-line/index.d.ts(30,58): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygonize/index.d.ts(7,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygonize/index.d.ts(7,27): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/polygonize/index.d.ts(8,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/random/index.d.ts(16,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/random/index.d.ts(29,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/random/index.d.ts(41,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/rhumb-destination/index.d.ts(6,44): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/sample/index.d.ts(7,15): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/sample/index.d.ts(9,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/sector/index.d.ts(15,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/shortest-path/index.d.ts(10,31): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/shortest-path/index.d.ts(10,50): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/shortest-path/index.d.ts(15,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/square-grid/index.d.ts(6,38): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/square-grid/index.d.ts(12,16): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/standard-deviational-ellipse/index.d.ts(16,53): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/standard-deviational-ellipse/index.d.ts(24,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/tag/index.d.ts(7,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/tag/index.d.ts(8,15): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/tag/index.d.ts(11,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/tesselate/index.d.ts(6,35): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/tesselate/index.d.ts(6,54): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/tin/index.d.ts(7,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/tin/index.d.ts(9,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/triangle-grid/index.d.ts(6,40): error TS1005: ',' expected.
C:/projects/my-app/node_modules/@turf/triangle-grid/index.d.ts(12,16): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/turf/index.d.ts(34,45): error TS2307: Cannot find module '@turf/nearest-point-to-line'.
C:/projects/my-app/node_modules/@turf/turf/index.d.ts(84,46): error TS2307: Cannot find module '@turf/point-to-line-distance'.
C:/projects/my-app/node_modules/@turf/union/index.d.ts(7,18): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/union/index.d.ts(8,4): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/unkink-polygon/index.d.ts(7,14): error TS2314: Generic type 'Feature<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/unkink-polygon/index.d.ts(7,27): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/unkink-polygon/index.d.ts(8,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/voronoi/index.d.ts(7,13): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
C:/projects/my-app/node_modules/@turf/voronoi/index.d.ts(9,4): error TS2314: Generic type 'FeatureCollection<G, Geometry>' requires 2 type argument(s).
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Can turf.js be used to find and repair bad geojson geometry?
Based on the error, it would appear that the issue is that poly2 is not a feature (since it doesn't have a type...
Read more >What's New In Python 3.10 — Python 3.11.1 documentation
To support this change, the internally used type cache now supports differentiating types. Literal objects will now raise a TypeError exception during equality ......
Read more >More than you ever wanted to know about GeoJSON
Here's a handy chart of what uses which ordering. ... All simple geometries in GeoJSON consist of a type and a collection of...
Read more >https://src.fedoraproject.org/rpms/kubernetes/c/45...
Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - --// Package...
Read more >A tour of the Dart language
This page shows you how to use each major Dart feature, from variables and operators to classes and libraries, with the assumption that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s the latest version. Just did “npm install @turf/turf”. I also tried with the 4.7 version and had the same problem.
And it’s not angular what’s preventing it from compiling. It actually works. But our Jenkins deployment allows 0 errors.
I’m not sure if this is still an issue. I don’t know the cause yet, but in short I think what’s happening is that the compiler is using the
@types/geojson
types when type checking the Turf methods, instead of picking them up fromturf-helpers/lib/geojson.ts
(which are similar to @types/geojson but different).The
Feature
interface, for example in@types/geojson
has 2 generic parameters (G for Geometry and P for Properties) for which it does not specify a default value. This leaves the implementer to specify them (hencerequires 2 type arguments
). TheFeature
type in Turf (which is similar but different to @types/geojson), does specify a default G and P so the implementing function doesn’t have to specify it, which is why Turf methods don’t specify it.