简体   繁体   English

使用Typescript进行响应的Facebook客户聊天插件

[英]Facebook Customer Chat Plugin For React with Typescript

I am developing a website with react and typescript and I want to include the Facebook customer chat plugin. 我正在开发一个带有react和Typescript的网站,并且我想包括Facebook客户聊天插件。 I found this Node module https://github.com/Yoctol/react-messenger-customer-chat . 我找到了这个Node模块https://github.com/Yoctol/react-messenger-customer-chat Which seems like it would do the trick. 似乎可以解决问题。

However there are no @types node module available for it. 但是,没有可用的@types节点模块。 So I can't use it with typescript. 所以我不能将它与打字稿一起使用。 I tried declaring my own d.ts declaration file however it's going over my head and I am unable to do so. 我尝试声明自己的d.ts声明文件,但是它已经超出了我的脑海,我无法这样做。 Should I keep trying to learn how to create a d.ts declaration for it, if so how? 我是否应该继续尝试学习如何为其创建d.ts声明,如果是的话,怎么做? Please point me to the right direction. 请指出正确的方向。 Otherwise is there an alternative to include the customer chat plugin in a react app. 否则,有一种替代方法可以将客户聊天插件包含在react应用中。

我找到了一个解决方案:通过导入创建一个简单的// @ tsignore,然后正常使用它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM