Joab Santos
Joab Santos

Reputation: 522

vscode: [ts] Experimental support for decorators is a feature that is subject to change

I'm getting "[ts] 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'm new to Angular and I don't how to 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

Upvotes: 9

Views: 6831

Answers (4)

hydRAnger
hydRAnger

Reputation: 3403

You can set

"javascript.implicitProjectConfig.experimentalDecorators": true

in your vscode setting.

Upvotes: 5

gihrig
gihrig

Reputation: 51

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

In that case name the config file jsconfig.json.

Upvotes: 0

Meirion Hughes
Meirion Hughes

Reputation: 26438

You've opened the editor on the src folder. For vscode's language service to find your tsconfig, you need to open the editor on the true root of the project holding your config.

Opened on root folder: enter image description here

Opened on src folder: enter image description here

Upvotes: 11

Sajeetharan
Sajeetharan

Reputation: 222722

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

Upvotes: 2

Related Questions