0

I get this error

Experimental support for decorators is a feature that is subject
to change in a future release. Set the 'experimentalDecorators' 
option to remove this warning.

only in newly created files. I tried all solutions like setting typescript.tsdk option and others . I see the same error in both VSCode and Atom editor.

As you can see below screenshot , errors happen in only new files.

enter image description here

I edit existing file with same content and there is no error.

enter image description here

Vamshi
  • 9,194
  • 4
  • 38
  • 54

1 Answers1

0

I think this happens because you do not have an experimentalDecorators option in your tsconfig file. You can try adding it there with false as suggested here. If you need it to be true, perhaps setting it explicitly will fix the warning, but the link is an issue on typescript repo, so you can get more information there about the details.

Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
  • oh no, I have all that. I tried all the obvious solutions. Thanks for your answer. If that was the case, it should show the errors for older files too. – Vamshi Jun 26 '17 at 06:41
  • 1
    You can next time add what you have tried so far to avoid getting this type of answers :) – Ilya Chernomordik Jun 26 '17 at 06:51
  • @Skeptor Your file may not be part of the tsconfig project. With the file open, try running the `TypeScript: Go to project configuration` command in vscode to check. It should open the `tsconfig.json` with `experimentalDecorators` set. If it does not, review your `include`, `exclude`, and `files` settings to see why the file is not being included – Matt Bierner Jun 28 '17 at 21:01