【问题标题】:How can we use Tawk.to in React with typescript我们如何在带有打字稿的 React 中使用 Tawk.to
【发布时间】:2022-11-27 19:31:58
【问题描述】:

我正在尝试使用 tawk.to 与打字稿做出反应,我安装了他们的官方 npm 包以将其添加到我们的网站中,但我收到此错误

import TawkMessengerReact from '@tawk.to/tawk-messenger-react';


Could not find a declaration file for module '@tawk.to/tawk-messenger-react'. 
'/Users/DrStrange/Desktop/supportapp/node_modules/@tawk.to/tawk-messenger-
react/dist/tawk-messenger-react.umd.js' implicitly has an 'any' type.

【问题讨论】:

    标签: reactjs typescript


    【解决方案1】:

    尝试添加类型

    npm i @types/tawkto-react
    

    【讨论】:

      猜你喜欢
      • 2022-10-21
      • 1970-01-01
      • 2015-10-23
      • 2020-08-15
      • 2021-11-22
      • 2019-01-06
      • 2020-01-14
      • 1970-01-01
      • 2019-02-18
      相关资源
      最近更新 更多