简体   繁体   English

在 eclipse 中,我在 javascript 文件中出现错误,该文件写入了带有私有字段的 class

[英]In eclipse, I have an error in a javascript file written a class with private fields

Like an image bellow, I have an error in a javascript file wrriten a class with private fields in eclipse.如下图所示,我在 javascript 文件中出现错误,该文件编写为 class,其中私有字段位于 eclipse 中。 Is's no problem in the "class" words but there is a problem in the "#" words at private fields. “class”字没有问题,但私有字段的“#”字有问题。 I can run this project with no error.我可以毫无错误地运行这个项目。 So it is the correct code.所以这是正确的代码。 Can I solve the problem?我可以解决问题吗?

我

Yes, it is a correct code, #variable is not yet understood by eclipse, it is compiling for old version of ECMA Script是的,这是一个正确的代码,#variable 尚未被#variable理解,它正在为旧版本的 ECMA 脚本编译

The warning appears due to asian characters you type inside the code, try to remove the asian language from the code and use plain english, then Eclipse will take it.由于您在代码中键入的亚洲字符而出现警告,尝试从代码中删除亚洲语言并使用简单的英语,然后 Eclipse 将接受它。

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

相关问题 如何枚举私有 JavaScript Class 字段 - How to Enumerate Private JavaScript Class Fields JavaScript 私有字段是每个 class 还是每个实例私有的? - Are JavaScript private fields private per class or per instance? Javascript:如何将带有私有字段的对象保存到文件? - Javascript: how to save object with private fields to file? 可以从JavaScript的类外部访问具有用TypeScript编写的具有受保护/私有字段的类吗? - Class with protected / private field written in TypeScript can be accessed from outside the class in JavaScript? 在 Codesandbox 中,为什么不能创建私有类字段? (Javascript) - In Codesandbox, Why cant you make private class fields? (Javascript) Javascript 私有 class 字段或方法在 iOS Chrome 或 Z50DE9BC68C93DC32D8C7C90593471760 中不起作用 - Javascript private class fields or methods not working in iOS Chrome or Safari 如何从 JavaScript 中的父类访问私有字段? - How to access private fields from parent class in JavaScript? 装饰器和私有字段 javascript - Decorators and Private fields javascript 如何运行我用JavaScript编写的代码? - How do I run code I have written in JavaScript? 页面的滚动百分比,我已经框架并编写了 javascript 但它不起作用 - scrolled percentage of a page, i have framed and written the javascript but it isnt working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM