Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Experimental support for decorators is a feature that is subject to change in a future release

I just cloned angular2-seed project from github and followed the steps, but i got this warning into VS code [ts] Experimental support for decorators is a feature that is subject to change in a future release. Set the 'Exxperimentaldecorators' option to remove this warning.

like image 649
Mourad Idrissi Avatar asked Sep 28 '16 14:09

Mourad Idrissi


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 # To solve the error "Experimental support for decorators is a feature that is subject to change in a future release", make sure to set the experimentalDecorators to true in your tsconfig.

How do you set the experimental decorators option?

Go to File -> Preferences -> Settings. 2. Search "experimentalDecorators" 3. Check Enable/disable experimentalDecorators 4.


2 Answers

I had that issue when using @Injectable() on a new service that I created. I had that warning from VS Code's typescript compiler.

The warning disappeared when I added that new service as a provider to the module where I intended to use it.

Hopefully this solves your issue.

like image 100
MThi Avatar answered Oct 12 '22 03:10

MThi


In Visual Studio code go to File -> Preferences -> Settings and check Experimental Decorators

enter image description here

like image 17
R15 Avatar answered Oct 12 '22 02:10

R15