VS CODE里"This constructor function may be converted to a class declaration.ts(80002)"的解决方法

 

这句话的大概意思就是建议你换个方式定义你的函数。(<span style="color:white">我打DOTA十几年了还要你来教我出装?!!</span>

这是VS CODE编辑器默认的推荐设置,没有强迫症的同学可以关掉这个页面了,有强迫症的同学就接着看怎么关掉这个该死的提示,我遇到时百度上没查到,google上有,所以这里特地为了方便一些不能FQ的同学。

依次点击: File>>Preferences>>Settings ,出现下面这个窗口

VS CODE里"This constructor function may be converted to a class declaration.ts(80002)"的解决方法

点击【Edit in settings.json】,把  "javascript.suggestionActions.enabled" :false, 加进去即可,像下面这样:

VS CODE里"This constructor function may be converted to a class declaration.ts(80002)"的解决方法