I am trying to use react-native-geolocation-service with in a React Native app and to do so the documentation says that to get the user's current location the following code needs to be added (see https://github.com/FaridSafi/react-native-google-places-autocomplete#more-examples):
navigator.geolocation = require('react-native-geolocation-service');
I am using Typescript and I am getting that navigator
cannot be found which makes sense to me. If I change the file from .tsx to .js it will recognize navigator
. How can I fix this using Typescript?