【问题标题】:Appcelerator Studio not detecting ES6 syntaxAppcelerator Studio 未检测到 ES6 语法
【发布时间】:2018-02-15 12:29:41
【问题描述】:

从 v6.1.0 开始,Titanium 支持 ECMAScript 6:https://docs.appcelerator.com/platform/latest/?mobile=/guide/ES6_in_Titanium_SDK_6.1.0

我目前使用的是官方的Accelerator Studio(基于Eclipse)。

不幸的是,工作室似乎在一些 ES6 代码下方添加了一条红色波浪线,例如:

books.map( () => 1 );
let x = 5;

尽管这些是 ES6 有效代码。

这表明 IDE 出于某种原因,JS 仍然无法识别 ES6 语法。

如何更新工作室以检测 ES6 语法?

【问题讨论】:

    标签: titanium appcelerator appcelerator-titanium appcelerator-studio


    【解决方案1】:

    在你链接到它的页面上说:

    Studio 尚不支持 ES6 语法,可能会错误地将此类代码标记为有错误:TISTUD-8764

    另请注意,根据该文档,使用 ES6 有额外的限制,您可能还必须对代码进行额外的更改才能使用 ES6。见Great, how do I use it now?下部分

    【讨论】:

    • 哦,我明白了。很惊讶它花了这么长时间。应该更好地阅读它。感谢您的帮助。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-27
    • 2020-11-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多