“找不到名称' tinymce' TS(2304)"据称是NPM安装类型之后
我正在制作一个打字稿编码的Web应用程序以在SharePoint中运行(特别不是节点!),其中包括使用此有用的编辑器Tinymce。
我通常没有问题,可以通过npm i -save-dev @types/< system/project>
终端命令来使TS检查器快乐。它适用于jQuery
,boot box
等。我可以通过index.d.ts
文件运行,以了解正在发生的事情。
但不是tinymce
:它在index.d.ts
文件中的注释中具有名称,但在代码中没有。有一些导出的对象,例如editormanager
,依此类推,但是指令将其引用为tinymce
。
必须做些什么来解决此错误,因为我希望正确检查此名称的脚本? (这意味着声明const tinymce:任何;
不是可接受的解决方案,我认为我认为在其他地方提到了这一点)。
I'm making a TypeScript-coded web app to run in SharePoint (specifically not Node!!) and which will include use of this useful editor TinyMCE.
I usually have no problem getting types I need through the npm i --save-dev @types/<system/project>
terminal command to keep the TS checker happy. It works for jquery
, bootbox
, etc. I can run through the index.d.ts
files to get an idea of what's going on.
But not tinymce
: It has the name in comments in the index.d.ts
file, but not in code. There are some exported objects like EditorManager
, and so on, but the instruction is to reference it as tinymce
.
What must be done to fix this error, as I want script properly checked for this name? (Which means declare const tinymce: any;
is not an acceptable solution, something I think I found mentioned elsewhere).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论