Set the ‘experimentalDecorators‘ option in your ‘tsconfig‘ or ‘jsconfig‘ to remove this warning

使用vscode 编辑typescript,添加了模块之后显示error

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

vscode是最新版本

Version: 1.56.0
Date: 2021-05-04T22:06:21.189Z (1 day ago)
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Darwin x64 19.4.0

tsconfig.json中添加了

 "emitDecoratorMetadata": true,
 "experimentalDecorators": true,

解决方案是在vscode的setting中设置

"js/ts.implicitProjectConfig.experimentalDecorators":true

在这里插入图片描述
参考:Experimental decorators warning in TypeScript compilation

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值