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.
-
This is a question and answer site...what's the question? – charlietfl Sep 28 '16 at 16:20
-
There is something not working with my VS code and typescript – Mourad Idrissi Sep 29 '16 at 13:26
-
I get this error with [js] instead of [ts]. WTF? – Brandon G Mar 17 '17 at 16:27
-
Possible duplicate of [VSCode: Is it possible to suppress experimental decorator warnings](https://stackoverflow.com/questions/31737677/vscode-is-it-possible-to-suppress-experimental-decorator-warnings) – sumitjainjr May 25 '18 at 11:34
10 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.

- 323
- 2
- 5
Go to File/preference/user settings in vscode, put this code
{
"typescript.tsdk": "node_modules/typescript/lib"
}

- 187
- 3
-
Currently the settings file is at: C:\Users\%username%\AppData\Roaming\Code\User\settings.json – alexkovelsky Oct 08 '20 at 09:02
In your tsconfig.json
file, add your project's path to the include
property like this:
"include": [
"app/**/*"
]
Or alternatively you can add individual files to the files
property. Here is what my tsconfig.json
looks like as an example (for an Angular2 app):
{
"compileOnSave": false,
"buildOnSave": false,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmitHelpers": true,
"sourceMap": true,
"types": [
"node"
],
"typeRoots": [
"../node_modules/@types"
],
"lib": [
"es2015",
"dom"
]
},
"files": [
"app/main.ts",
"app/app.module.ts"
],
"include": [
"app/**/*.ts"
],
"exclude": [
"node_modules",
"dist",
"build",
"app/main.aot.ts"
]
}

- 2,006
- 4
- 23
- 43
Your tsconfig.json should be like this:
{
"compilerOptions": {
"experimentalDecorators": true
},
"files": [], //add a "files" array (in my case empty)
"exclude": [
"node_modules"
]
}
Alternatively you can add a line in VSCode preferences (user settings)
"javascript.implicitProjectConfig.experimentalDecorators": true

- 741
- 1
- 8
- 28
-
`javascript.implicit...` did not solve the issue for me, nor did eexperimentalDecorators added to compilerOptions – Caleb Jay Jan 31 '19 at 00:36
-
In VS Code settings find "experimentalDecorators". This will list Extension->TypeScript with a property JavaScript-> Implicit Project Config -> Experimental Decorators enable this setting will resolve warrning

- 11
- 1
In VS Code, open settings.json
and add this line:
"javascript.implicitProjectConfig.experimentalDecorators": true

- 4,223
- 2
- 34
- 37
I get this warning in VS Code on newly added classes. Project compiles without any errors. When I start to reference the newly added class via import
the warning diappears.
There is no need to change configuration in VS Code or Typescript in such case.

- 8,221
- 1
- 59
- 63
I solved a similar problem using a command like this
tsc .\app.ts --experimentalDecorators --target es6
where .\app.ts is the path of the file

- 35
- 6
It is due to the use of older version of typescript. You must upgrade your typescript version to remove this message.
npm install -g typescript@latest
Also you need to upgrade your npm to latest version as well.

- 429
- 8
- 13
-
2I already have the latest version of typescript (2.0.3), I just upgraded npm but nothing has changed – Mourad Idrissi Sep 29 '16 at 13:24