Experimental decorators warning in TypeScript compilation

0 votes

I receive the warning...

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

... even though my compilerOptions in tsconfig.json have the following settings:

"emitDecoratorMetadata": true,
"experimentalDecorators": true,

What is weird is that some random classes that use decorators do not show that warning but the rest in the same project do.

What could cause such behavior in the TypeScript compiler?

Aug 3, 2022 in TypeSript by Elton
• 400 points
1,240 views

1 answer to this question.

0 votes
Although VS Code is an excellent editor for TypeScript projects, it occasionally requires a jolt. Certain files frequently cause it to freak out and complain without warning. The most common solution appears to be to save and close all open files before opening tsconfig.json. After that, you should be able to reopen the problematic file without issue. If that fails, lather, rinse, and repeat.

If your tsconfig.json uses the files array to specify its source files, IntelliSense will only work if the file in question is referenced in such a way that VS Code can find it by traversing the input file tree.

Edit: The'reload window' command (added a long time ago) should resolve this issue once and for all.
answered Aug 3, 2022 by Abhinaya
• 1,160 points

Related Questions In TypeSript

0 votes
1 answer
0 votes
1 answer

How to create ES6 Map in Typescript

Refer this as an example this.configs = new ...READ MORE

answered May 31, 2022 in TypeSript by Nina
• 3,060 points
411 views
0 votes
1 answer

What is TypeScript and why would I use it in place of JavaScript?

TypeScript is a superset of JavaScript which primarily ...READ MORE

answered May 31, 2022 in TypeSript by Nina
• 3,060 points
317 views
0 votes
1 answer

How to declare and initialize a Dictionary in Typescript

Apparently this doesn't work when passing the ...READ MORE

answered May 31, 2022 in TypeSript by Nina
• 3,060 points
5,579 views
0 votes
0 answers

TypeScript type cast & D3.js errors

Now, how should I solve this/typecast this? import ...READ MORE

Jul 18, 2022 in TypeSript by Logan
• 2,140 points
1,197 views
0 votes
1 answer

How does the @property decorator work?

The property() function returns a special descriptor object: >>> property() <property object ...READ MORE

answered Sep 19, 2018 in Python by Priyaj
• 58,090 points
1,434 views
0 votes
1 answer

Cannot access web3 object with typescript and ethereum

You still need to instantiate it first. ...READ MORE

answered Sep 25, 2018 in Blockchain by slayer
• 29,350 points
2,661 views
0 votes
1 answer

Linter pylint is not installed

Open a terminal (ctrl+~) Run the command pip ...READ MORE

answered Apr 15, 2019 in Python by SDeb
• 13,300 points
1,874 views
0 votes
1 answer
0 votes
1 answer

What is the question mark for in a Typescript parameter name?

It is to mark the parameter as optional. TypeScript ...READ MORE

answered Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points
1,022 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP