You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
If you would like to upvote the priority of this issue, please comment below or react on the original post above with 👍 so we can see what is popular when we triage.
@DarkNasuada Thank you for opening this issue. 🙏
Please check out these other resources that might help you get to a resolution in the meantime:
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
Solution:
add following line:
status: google.maps.DirectionsStatus;
in the exported interface DirectionsResult (Line 1033 in index.d.ts)
The text was updated successfully, but these errors were encountered: