google-maps-services-js
google-maps-services-js copied to clipboard
Directions: Missing type "google.maps.DirectionsStatus" in "google.maps.DirectionsResult" OS:W11 Pro
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)
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: 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:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
- StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.