刚刚将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