Fix typing and build

This commit is contained in:
Pieter Vander Vennet 2022-11-07 23:35:17 +01:00
parent 336ebc4ea9
commit 5f1a7892c1
6 changed files with 20 additions and 19 deletions

View file

@ -10,7 +10,7 @@ import {
MultiPolygon,
Polygon,
} from "@turf/turf"
import { LineString, Point } from "geojson"
import {GeoJSON, LineString, Point} from "geojson"
import togpx from "togpx"
import Constants from "../Models/Constants"
@ -37,8 +37,8 @@ export class GeoOperations {
* Returns [lon,lat] coordinates
* @param feature
*/
static centerpointCoordinates(feature: AllGeoJSON): [number, number] {
return <[number, number]>turf.center(feature).geometry.coordinates
static centerpointCoordinates(feature: AllGeoJSON | GeoJSON): [number, number] {
return <[number, number]>turf.center(<any> feature).geometry.coordinates
}
/**