【VSCode】VSCode踩坑之experimentalDecorators

当我使用VSCode开发TypeScript工程时,有的机器是正常的,有的机器就会报一些莫名其妙的错误。比如这个:

Experimental support for decorators is a feature that is subject to change in a future release.
Set the 'experimentalDecorators' option to remove this warning.

错误很明显,就是让我们配置experimentalDecorators属性,可是死活不起作用。

最后的解决放方法是,在VSCode的配置中,搜索experimentalDecorators,没错,就是跟tsconfig中的名字一毛一样,勾选,重启,问题解决。欧耶!

解决方式很简单,但这种“小问题”最是花时间,这里Mark一下了。

转载自: https://zhuanlan.zhihu.com/p/81365792?from_voters_page=true

原文地址:https://www.cnblogs.com/mailyuan/p/14378882.html