I am trying to recreate searoute-js using typescript for some learning however when trying to call the constructor I receive an error.
Error
Error [TypeError]: geojson_path_finder__WEBPACK_IMPORTED_MODULE_5__ is not a constructor
Caused by:
import marnet from "../data/marnet.json";
import PathFinder from "geojson-path-finder";
const geoJson = marnet as FeatureCollection<LineString>;
const pathFinder = new PathFinder(geoJson);
Package Version : v2.0.2
I am trying to recreate searoute-js using typescript for some learning however when trying to call the constructor I receive an error.
Error
Caused by:
marnet.json
I noticed that the docs do not have a full typescript example so I am most likely doing something wrong.