Error reporting when using empirical decorators in vscode

 

Using the new syntax decorator of ES7 in vscode will report an error, as shown in the figure:

 

  This is an error. It comes from the JS support of vscode. Just create a jsconfig.json file in the project root directory and add the following contents:

{
    "compilerOptions": {
        "experimentalDecorators": true
    }
}

Adding a can take effect only after restarting

githubissue: https://github.com/Microsoft/vscode/issues/28097#issuecomment -306560817

Similar Posts: