简体   繁体   English

“接口中的计算属性名称必须直接引用内置符号”

[英]“A computed property name in an interface must directly refer to a built-in symbol”

I am receiving this error when building a C# web api backend and angular 6 frontend in one Visual Studio solution. 在一个Visual Studio解决方案中构建C#Web API后端和angular 6前端时,我收到此错误。 I am using VS 2015 for this. 我为此使用VS 2015。 These errors are coming from the node modules in @angular\\core\\src\\interfaces and @angular\\core\\src\\sanitization 这些错误来自@angular\\core\\src\\interfaces@angular\\core\\src\\sanitization @angular\\core\\src\\interfaces的节点模块

When using just the front end or just the back end, they both individually run fine. 仅使用前端或后端时,它们都可以正常运行。 But the back end will not build if the front end is included in the VS project. 但是,如果VS项目中包含前端,则不会构建后端。

I don't know why you get the error in some cases but not others, but I can tell you that error will go away if you upgrade to TypeScript 2.7 or newer. 我不知道为什么在某些情况下会收到错误,但在其他情况下却不会,但是我可以告诉您,如果升级到TypeScript 2.7或更高版本,该错误将消失。 Go to the downloads page and install the latest download for Visual Studio 2015. 转到下载页面,并安装Visual Studio 2015的最新下载。

从Visual Studio下载最新的打字稿版本, https://www.microsoft.com/zh-cn/download/confirmation.aspx? id = 55258

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TypeScript 类型文字中的计算属性名称必须直接引用内置符号 - TypeScript A computed property name in a type literal must directly refer to a built-in symbol ngrx / effects中的Typescript错误:计算属性名称必须引用内置符号 - Typescript error in ngrx/effects: computed property name must refer to a built in symbol 接口中的计算属性名称必须引用其类型为文字类型或“唯一符号”类型的表达式 - A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type 类型文字中的计算属性名称必须引用类型为文字类型或“唯一符号”类型的表达式 - A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type 打字稿:类型文字中的计算属性名称必须引用类型为文字类型或“唯一符号”的表达式 type.ts(1170) - Typescript : A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.ts(1170) TypeScript - 计算属性名称的类型必须为“字符串”、“数字”、“符号”或“任意” - TypeScript - A computed property name must be of type 'string', 'number', 'symbol', or 'any' 打字稿错误:计算的属性名称必须是“字符串”、“数字”、“符号”或“任何”类型 - Typescript error: A computed property name must be of type 'string', 'number', 'symbol', or 'any' 如何在界面中键入内置的 function? - How to type a built-in function in an interface? 属性名称必须是“字符串”、“数字”、“符号”或“任何”类型 - Property name must be of type 'string', 'number', 'symbol', or 'any' Typescript 接口中符号的计算密钥 - Computed Key from Symbol in Typescript Interface
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM