[英]TypeScript errors while editing JavaScript file in VSCode
Just out of the blue, I've been experiencing weird TypeScript errors in my pure JavaScript files. 出乎意料的是,我在纯JavaScript文件中遇到了奇怪的TypeScript错误。 I don't use TypeScript at all, so I have no idea where this came from.
我根本不使用TypeScript,所以我不知道它来自哪里。 Perhaps I mashed my keyboard and something was enabled?
也许我混搭了键盘并且启用了某些功能? Not sure.
不确定。
Things to note: 注意事项:
For example, I'm receiving an error [ts] '$var1' is declared but its value is never read.
例如,我收到错误
[ts] '$var1' is declared but its value is never read.
on hover of a variable that has been declared, just not referenced. 将鼠标悬停在已声明但未引用的变量上。 It also washes out the variable color, which is quite annoying.
它还会洗掉可变的颜色,这很烦人。
Here are the extensions I'm using: 这是我正在使用的扩展名:
If someone could point me in the right direction I would really appreciate it. 如果有人能指出正确的方向,我将不胜感激。 This is a minor issue, but it's really annoying.
这是一个小问题,但确实很烦人。
As pointed out in the comments, this seems to be an update to VS Code "Highlight unused variables and imports". 正如评论中指出的那样,这似乎是对VS代码“突出显示未使用的变量和导入”的更新。
Here is more info about this release and feature in particular: https://code.visualstudio.com/updates/v1_24#_highlight-unused-variables-and-imports 以下是有关此版本和功能的更多信息,特别是: https : //code.visualstudio.com/updates/v1_24#_highlight-unused-variables-and-imports
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.