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
While converting some JS code to TS, I notice some discrepancies between the actual JS library and the types defined in @types/google.maps.
For instance, the google.maps.ControlPosition enum is defined here with a set of values, but if I console.log the real values I get something much different:
This is an old issue, also referenced in another PR but that got fixed in other library rather than here for some reason.
Another (minor) issue I spotted is that we can invoke something like map.center but that is also not defined in the type definitions. map.center does the same as map.getCenter() and, while that can be easily replaced, it should also be easy to update the definitions to contain get center.
I am happy to create a PR or to investigate further discrepancies.
Please do let me know if you need more information.
Thanks.
The text was updated successfully, but these errors were encountered:
mrkesh
added
triage me
I really want to be triaged.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
labels
Sep 4, 2022
While converting some JS code to TS, I notice some discrepancies between the actual JS library and the types defined in @types/google.maps.
For instance, the
google.maps.ControlPosition
enum is defined here with a set of values, but if Iconsole.log
the real values I get something much different:This is an old issue, also referenced in another PR but that got fixed in other library rather than here for some reason.
Additionally, the values don't seem to match the documentation found on the website: https://developers.google.com/maps/documentation/javascript/reference/3.49/control#ControlPosition
Another (minor) issue I spotted is that we can invoke something like
map.center
but that is also not defined in the type definitions.map.center
does the same asmap.getCenter()
and, while that can be easily replaced, it should also be easy to update the definitions to containget center
.I am happy to create a PR or to investigate further discrepancies.
Please do let me know if you need more information.
Thanks.
The text was updated successfully, but these errors were encountered: