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 in TypeSript by Elton
• 400 points
12 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 by Abhinaya
• 760 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 in TypeSript by Nina
• 3,020 points
23 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 in TypeSript by Nina
• 3,020 points
13 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 in TypeSript by Nina
• 3,020 points
205 views
0 votes
0 answers

TypeScript type cast & D3.js errors

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

Jul 18 in TypeSript by Logan
• 2,140 points
8 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,080 points
746 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,310 points
1,856 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,370 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 in TypeSript by Abhinaya
• 760 points
12 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP