【发布时间】:2020-11-26 05:33:34
【问题描述】:
如何在打字稿中导入 google.maps.LatLngBounds() 我需要这个“google”。什么是 npm pack?
【问题讨论】:
标签: angular
如何在打字稿中导入 google.maps.LatLngBounds() 我需要这个“google”。什么是 npm pack?
【问题讨论】:
标签: angular
您可以安装包@types/googlemaps,使全局变量google 可用,然后您可以在任何地方使用google.maps.LatLngBounds 类型。
或者,您可以安装 @googlemaps/types,它们是由 Google 策划的类型定义。它们是由 Google 自己自动生成的,但相对较新,似乎没有太多 documentation 附件。
【讨论】: