我得到“[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
}
}
打印:
最佳答案
您已经在 src 文件夹上打开了编辑器。为了让 vscode 的语言服务找到您的 tsconfig,您需要在保存您的配置的项目的真正根目录下打开编辑器。
关于javascript - vscode : [ts] Experimental support for decorators is a feature that is subject to change,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45580327/