While creating an Injectable
in my Angular project, I came across the following error:
Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.ts(1219)
As an attempt to get rid of this lint error, I added
"compilerOptions": {
"experimentalDecorators": true,
"allowJs": true,
}
to the tsconfig.json
file. But the real solution to this error is enabling the ExperimentalDecorator
option in VS Code's setting.
This option was found at Setting -> ExperimentalDecorator
.