【发布时间】:2018-01-16 17:34:36
【问题描述】:
我收到“[ts] 对装饰器的实验性支持是一项可能会在未来版本中更改的功能。设置 'experimentalDecorators' 选项以删除此警告。”
我是 Angular 新手,我不知道如何解决它。
我的 tsconfig.json 文件:
{
"compilerOptions":{
"allowSyntheticDefaultImports":true,
"declaration":false,
"emitDecoratorMetadata":true,
"experimentalDecorators":true,
"lib":[
"dom",
"es2015"
],
"module":"es2015",
"moduleResolution":"node",
"sourceMap":true,
"target":"es5"
},
"include":[
"src/**/*.ts"
],
"exclude":[
"node_modules"
],
"compileOnSave":false,
"atom":{
"rewriteTsconfig":false
}
}
打印:
【问题讨论】:
-
VSCode 使用的是哪个版本的 TypeScript? (见VSCode的右下角)
-
请查看answer
-
感谢您的回答,但我已经在下面得到了答案,并且成功了。
标签: javascript angular typescript visual-studio-code