简体   繁体   English

属性 'google' 不存在于类型 'Readonly<{ IGoogleMapTrackerProps }> & Readonly<{ chirldren?: ReactNode; }>'

[英]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.

相关问题 属性 &#39;XYZ&#39; 不存在于类型 &#39;Readonly&lt;{ children?: ReactNode; }&gt; 和只读&lt;{}&gt;&#39; - Property 'XYZ' does not exist on type 'Readonly<{ children?: ReactNode; }> & Readonly<{}>' 打字稿错误属性 x 在类型“只读”上不存在<Props> &amp; Readonly&lt;{ children?: ReactNode; }&gt;&#39; - Typescript error Property x does not exist on type 'Readonly<Props> & Readonly<{ children?: ReactNode; }>' &#39;Readonly&lt;{}&gt; &amp; Readonly&lt;{ children?: ReactNode; 类型上不存在属性“导航” }&gt; - Property 'navigation' does not exists on type 'Readonly<{}> & Readonly<{ children?: ReactNode; }> 类型“ Readonly &lt;{}&gt;”上不存在属性“ xxx” - Property 'xxx' does not exist on type 'Readonly<{}>' 类型“只读&lt;{}&gt;”上不存在属性“产品” - Property 'products' does not exist on type 'Readonly<{}>' 类型“IntrinsicAttributes 和 IntrinsicClassAttributes”上不存在属性“名称”<product> &amp; 只读&lt;{}&gt;'</product> - Property 'name' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Product> & Readonly<{}>' “只读”类型上不存在属性“路由器” <props & routecomponentprops<{}, staticcontext, poormansunknown> &gt;</props> - Property 'router' does not exist on type 'Readonly<Props & RouteComponentProps<{}, StaticContext, PoorMansUnknown>> vue-apollo - 类型“只读”上不存在属性“值” <ref<readonly<any> &gt;&gt;' </ref<readonly<any> - vue-apollo - Property 'value' does not exist on type 'Readonly<Ref<Readonly<any>>>' 类型 &#39;{ props: ReactNode; 上不存在属性 &#39;className&#39; }&#39; - Property 'className' does not exist on type '{ props: ReactNode; }' this.state.someProp 在 ReadOnly 类型上不存在 - this.state.someProp Does Not Exist on type ReadOnly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM