[英]Property 'google' does not exist on type 'Readonly<{ IGoogleMapTrackerProps }> & Readonly<{ chirldren?: ReactNode; }>'
I'm am a beginner developer in SharePoint and I stuck With Google map.我是 SharePoint 的初学者开发人员,我坚持使用 Google 地图。 I install google-maps-react but there is one error show me.
我安装了 google-maps-react,但有一个错误显示给我。 I don't know how to solve it... Plz, let me know about this solution... Thank you
我不知道如何解决它......请让我知道这个解决方案......谢谢
Well it is telling you that google is not a property in the IGoogleMapTrackerProps.好吧,它告诉您 google 不是 IGoogleMapTrackerProps 中的属性。 You specified that you will have props of IGoogleMapTrackerProps, but you are providing google prop instead.
您指定您将拥有 IGoogleMapTrackerProps 的道具,但您提供的是 google 道具。
If that is intentional, you can extend the IGoogleMapTrackerProps to include google for example:如果这是故意的,您可以扩展 IGoogleMapTrackerProps 以包含 google,例如:
interface Props extends IGoogleMapTrackerProps {
google: // type of google
}
and use the Props interface instead of IGoogleMapTrackerProps in class definition.并在类定义中使用 Props 接口而不是 IGoogleMapTrackerProps 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.