Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

experimental support for decorators visual studio 2017

Tags:

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.

enter image description here

like image 654
LearningPal Avatar asked Aug 18 '18 09:08

LearningPal


People also ask

What is experimental support for decorators?

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.

How do you set the experimental decorators option?

Click on CTRL + , to open your editor's settings. In the search bar type: implicitProjectConfig. experimental. Check the checkbox of the Experimental Decorators setting.

How do I remove Experimentaldecorator warning in VSCode?

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”


1 Answers

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.

like image 120
Haiku Avatar answered Sep 29 '22 19:09

Haiku