对象不是通用的(谷歌地图反应)



刚刚将google-maps-react@types/googlemaps一起添加到我的项目中。现在,当我试图捆绑项目时,我会得到以下错误。

../../node_modules/google-maps-react/index.d.ts:29:14 - error TS2315: Type 'Object' is not generic.
29 type Style = Object<string, string | number | boolean>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

究竟是什么原因造成的?

您需要为google-maps-react添加类型

npm install @types/google-maps-react

最新更新