小编Sha*_*aze的帖子

没有重载与此调用相匹配。在反应中

我收到此错误:

D:/Downloads/Uber-Website-Clone-master/src/App.tsx D:/Downloads/Uber-Website-Clone-master/src/App.tsx(17,7) 中的 TypeScript 错误:没有重载与此调用匹配。重载第 1 个(共 2 个)“(props: Readonly): LoadScript”,出现以下错误。

D:/Downloads/Uber-Website-Clone-master/src/App.tsx
TypeScript error in D:/Downloads/Uber-Website-Clone-master/src/App.tsx(17,7):
No overload matches this call.
  Overload 1 of 2, '(props: Readonly<LoadScriptProps>): LoadScript', gave the following error.
    Type 'string | undefined' is not assignable to type 'string'.
      Type 'undefined' is not assignable to type 'string'.
  Overload 2 of 2, '(props: LoadScriptProps, context?: any): LoadScript', gave the following error.
    Type 'string | undefined' is not assignable to type 'string'.
      Type 'undefined' is not assignable to …
Run Code Online (Sandbox Code Playgroud)

google-maps typescript reactjs react-redux

3
推荐指数
1
解决办法
4605
查看次数

标签 统计

google-maps ×1

react-redux ×1

reactjs ×1

typescript ×1