Property 'countryName' does not exist on type 'NativeGeocoderReverse Result[]'


#1

i am getting error when i start cmd : ionic cordova build android --proud

Property ‘countryName’ does not exist on type ‘NativeGeocoderReverseResult[]’.

L45: let country = this.toaster.create({
L46: message: res.countryName,
L47: duration: 4000

my home.ts

geolocate() {
let options = {
enableHighAccuracy: true
};
this.locationAccuracy.canRequest().then((res: boolean) => {
if (res) {
this.locationAccuracy.request(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY).then(() => {
this.geolocation.getCurrentPosition(options).then((position: Geoposition) => {
this.getcountry(position);
}).catch((err) => {
alert(err);
})
}, (error) => {
alert(error);
})
}
})

}

getcountry(pos) {
this.nativeGeocoder.reverseGeocode(pos.coords.latitude, pos.coords.longitude).then((res: NativeGeocoderReverseResult[]) => {
let country = this.toaster.create({
message: res.countryName,
duration: 4000
});
country.present();
})
}