npm Visual Studio 2022:对装饰器的实验性支持是一个特性,在未来的版本中可能会发生变化

sgtfey8w  于 2023-08-06  发布在  其他
关注(0)|答案(1)|浏览(130)

我无法在Visual Studio 2022中构建Angular 应用程序
我收到下一个错误:

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.

字符串
有人知道如何解决这个问题吗?experimentalDecorators 设置为false,但它没有帮助。

的数据

2izufjch

2izufjch1#

通过在csproj中添加以下行来修复错误:

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

字符串

相关问题