VScode报错Experimental support for decorators is a feature that is subject to change...错误原因,及解决办法
VSCode工具报“Experimental support for decorators is a feature that is subject to change in a future release. Set the ‘experimentalDecorators’ option to remove this warning.”and“Unable to resolve signature of method decorator when called as an expression.”错误原因
(对装饰者的实验支持是未来发布中可能会发生变化的特征 and 作为表达式调用时无法解析方法decorator的签名 )
解决办法:
先设置“实验装饰器”选项
如不行,则:在VSCode的settings.json中设置javascript.implicitProjectConfig.experimentalDecorators为true。
还是不行的话:在命令行中运行
$ tsc myFileName.ts --target ES5 -w --experimentalDecorators
监听ts文件的热更新
还是不行的话,偶也冒的办法喽