In my react native app I have used geolib to find the nearest place to a certain point from a list of places, like this
const nearestPlace = geolib.findNearest({ latitude:6.4423456, longitude:75.9095818 }, (places));
once I console log nearestPlace I get one latitude, longitude pair but when I try to get the value of the latitude like this,
const latitudeValue = nearestPlace.latitude
It's giving me an error saying property latitude does not exist on type 'GeolibInputCoordinates' so I can't get the latitude value.
Any Idea how to solve this?