Search code examples
angularvisual-studionpmnode-modulestsconfig

Visual Studio 2022: Experimental support for decorators is a feature that is subject to change in a future release


I am unable to build an angular application in Visual Studio 2022

I receive the next error:

TS1219  Build: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.

Does anybody know how to fix this issue? experimentalDecorators set to false, but it didn't help. enter image description here


Solution

  • The errors were fixed by adding the next lines into the csproj:

      <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
        <TypeScriptModuleKind>commonjs</TypeScriptModuleKind>
       <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
      </PropertyGroup>