I'm getting "[ts] Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning."
I'm new to Angular and I don't how to solve it.
My tsconfig.json file :
{
"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
}
}
Print :
I'm getting "[ts] Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning."
I'm new to Angular and I don't how to solve it.
My tsconfig.json file :
{
"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
}
}
Print :
Share Improve this question edited Nov 24, 2019 at 18:53 Jack Lu 1702 silver badges13 bronze badges asked Aug 9, 2017 at 1:29 Joab SantosJoab Santos 5222 gold badges9 silver badges22 bronze badges 3- Which version pf TypeScript is VSCode using? (See the bottom right corner in VSCode) – Saravana Commented Aug 9, 2017 at 3:21
- Please check this answer – Manoj Paul Commented Apr 12, 2018 at 9:17
- Thanks for answering, but I already have the answer below, and it worked. – Joab Santos Commented Apr 12, 2018 at 14:03
4 Answers
Reset to default 11You've opened the editor on the src folder. For vscode's language service to find your tsconfig, you need to open the editor on the true root of the project holding your config.
Opened on root folder:
Opened on src folder:
You can set
"javascript.implicitProjectConfig.experimentalDecorators": true
in your vscode setting.
Move your tsconfig.json
inside the root folder and restart the IDE. That should work.
Meirion Hughes answer is correct, I just want to add that this works in JS environments as well.
In that case name the config file jsconfig.json
.