我正在編寫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