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
For the most part, the type looks good, until you start digging into the nested properties. I didn't check the entire type but I noticed that if you follow the type to: google.maps.GeocoderResult.geometry.location instead of returning lat and lng as number it returns them as function which would not work for a simple use case where you would like to parse an API's response.
If that type is not meant to be used like this, then I guess there are no types for API responses which is also not convenient if you want to integrate directly with the APIs using types.
The text was updated successfully, but these errors were encountered:
I'm not sure if this is the right place to fill this issue since I could not open issues on https://github.com/googlemaps/DefinitelyTyped
I was looking for a simple type for the Geocode API. Right now the API's type would look something like this:
The closest thing I found to this type in https://github.com/googlemaps/DefinitelyTyped would be google.maps.GeocoderResult.
For the most part, the type looks good, until you start digging into the nested properties. I didn't check the entire type but I noticed that if you follow the type to:
google.maps.GeocoderResult.geometry.location
instead of returninglat
andlng
asnumber
it returns them asfunction
which would not work for a simple use case where you would like to parse an API's response.If that type is not meant to be used like this, then I guess there are no types for API responses which is also not convenient if you want to integrate directly with the APIs using types.
The text was updated successfully, but these errors were encountered: