I have created a .Net Core project with AngularJS in Visual Studio 2017 however when I am trying to create a service, I am getting an error as
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 have checked several links such as editing tsconfig.json following links such as link1 and link2
Now my tsconfig.json looks like below
{ "compileOnSave": false, "compilerOptions": { "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, "moduleResolution": "node", "experimentalDecorators": true, "allowJs": true, "noEmit": true, "target": "es5", "typeRoots": [ "node_modules/@types" ], "lib": [ "es2017", "dom" ] }, "include": [ "app/**/*" ], "files": [], //add a "files" array (in my case empty) "exclude": [ "node_modules" ], "typeAcquisition": { "enable": true // helps fuel better js intellisense } }
But I still see the error and I am clueless now.
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. Ts(1219) Angular With Code Examples.
Click on CTRL + , to open your editor's settings. In the search bar type: implicitProjectConfig. experimental. Check the checkbox of the Experimental Decorators setting.
Solving warning: “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”
add
<PropertyGroup> <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators></PropertyGroup>
in .csproj file of your project as it will be given precedence over tsconfig.json file and the restart visual studio and the error is no longer there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With