[VSCode] Experimental Decorator Error

1334 단어 vscodeAngularAngular

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.

좋은 웹페이지 즐겨찾기