Vscode: [ts] Experimental decorator support is a feature that can be changed.

I get "[ts] Experimental decorator support is a feature that may be changed in a future version. Set the" experimentalDecorators "parameter to remove this warning."

I am new to Angular and I cannot 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:

enter image description here

+5
source share
3 answers

You opened the editor in the src folder. For the vscode language service to find your tsconfig, you need to open the editor by the true root of the project containing your configuration.

Opened in root folder: enter image description here

Opened in src folder: enter image description here

+6
source

Move tsconfig.json to the root folder and restart the IDE. That should work.

0
source

Meirion Hughes answer is correct, I just want to add that this also works in JS environments.

In this case, name the configuration file jsconfig.json .

0
source

Source: https://habr.com/ru/post/1270704/


All Articles