我正在编写three.js代码并在设置中启用了TypeScript定义。但是没有效果。我下载了它,检查了刻度但没有发生任何事情。所有three.js代码都有下划线,WebStorm写入没有导入。完整的日志:WebStorm TypeScript定义不起作用
Missing import statement less... (Ctrl+F1) Checks that all modules are referenced through import statements. Suggests inserting the import statement. When using libraries that define their own global symbols outside their visible JavaScript code (e.g. describe() in Mocha), it is recommended that you add the corresponding TypeScript type definition file as a JavaScript library in Preferences | Languages & Frameworks | JavaScript | Libraries.
如何解决它,代码正常,因为现在这是不可能的?
我不仅使用脚本标签,而且使用TypeScript定义。几个月前它工作,但现在不行。我也一样。附:可能,现在我需要添加导入评论,但我不记得,如何。 –
如果您使用TypeScript编写代码,则所引用的“import comment”可能是[triple-slash指令](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html)。否则,我不知道你如何让它工作之前,对不起:( – cvsguimaraes