find and solve || findandsolve.com
Please wait.....

Welcome back.






Before Read Terms of use

Set the experimentalDecorators option in your tconfig or jsconfig to remove this warning

Set the experimentalDecorators option in your tconfig or jsconfig to remove this warning


(TS) Experimental support for decorators is a feature that is subject to change in a future release.Set the 'experimentalDecorators' option in your 'tconfig' or 'jsconfig' to remove this warning.

Are you getting this type of error 'experimentalDecorators' warning in VSCode?I have spent a few some time before finding a solution in angular(TS), I hope this will working fine and save your valuable time.

In typescript(TS) a “decorator” is a special kind of declaration which its expression is evaluated during application runtime and it can be attached to accessor, property,class,parameter or method.


Try to fixed this type of issue as given below.


Solution 1

In your VSCode, Go to File => Preferences => Settings (or Control+comma) and it will open the User Settings file. Add "javascript.implicitProjectConfig.experimentalDecorators": true to the file and it should fix it.


Solution 2

I have the following in my > File/preference/user settings in vscode

{
  "typescript.tsdk": "node_modules/typescript/lib" 
}

And also Inside the project create file tsconfig.json ,then add this lines as given below

{
    "compilerOptions": {
        "experimentalDecorators": true,
        "allowJs": true
    }
}
Solution 3

You can open the file from the menu as mentioned as given below below


Then add the following code as given below in your settings.json file

{
"typescript.tsdk": "node_modules/typescript/lib",
"enable_typescript_language_service": false
}
Solution 4

If the case above was not your case, so check if the properties and “experimentalDecorators” are correctly defined in “tsconfig.json” file as given below.

{

  "compilerOptions": {
    "outDir": "./dist"
    "rootDir": "./src"
    /* Experimental Options */
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    /* Advanced Options */
    "forceConsistentCasingInFileNames": true
  }
}

Mahira  khanna

Mahira khanna

I have the skills you need for you company blog, website, or other content materials

1 Comments


Avatar for Rahul   Sharma
Rahul Sharma 1

Perfect.


Report Response