node.js - 对象不是通用的(google-maps-react)
问题描述
刚刚添加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
推荐阅读
- python - 请建议使用 Python 对电子邮件标题字符串值进行模糊匹配的改进
- php - PHP使用来自mysql查询的结果字段值作为邮件接收者
- regex - htaccess - 重写以特定字符串结尾的 URL 并捕获唯一部分
- angular - 对基于自定义 ReplaySubject 的 observable 的同步阻塞订阅调用
- azure-cognitive-search - 是否可以获得类似和/相同文件的列表?
- javascript - 从 Firestore 保存数据
- ruby-on-rails - 如何删除rails中的部分url?
- wordpress - chrome 不支持我的 wordpress 主题媒体查询断点@media (max-width: 576px)
- sql-server - SQL 子行 - UNION vs JOIN
- r - 使用 R 进行精算练习