Property google.maps.DirectionsStatus is missing in the type google.maps.DirectionsResult
when i console.log the result it is in the object.
using latest version of @types/google.maps
const result = await DirectionsService.route(request)
//result.status throws typescript error: Property 'status' does not exist on type 'DirectionsResult'.ts(2339)
if (result.status === 'OK') {
DirectionsRenderer.setDirections(result)
}
Solution:
add following line:
status: google.maps.DirectionsStatus;
in the exported interface DirectionsResult (Line 1033 in index.d.ts)