As of v6.1.0, Titanium supported ECMAScript 6: https://docs.appcelerator.com/platform/latest/?mobile=/guide/ES6_in_Titanium_SDK_6.1.0
I am currently using the official Accelerator Studio (based on Eclipse).
Unfortunately, it seems that the studio puts a red squiggly line underneath some ES6 code such as:
books.map( () => 1 );
let x = 5;
despite these being ES6 valid code.
This indicates to me that the IDE for some reason, JS still does not recognise ES6 syntax.
How can I update the studio so it detects ES6 syntax?
答案 0 :(得分:1)
在您关联的页面中显示:
Studio尚不支持ES6语法,可能会错误地将此类代码标记为有错误:TISTUD-8764
另请注意,根据该文档,使用ES6还有其他限制,您可能还需要对代码进行其他更改才能使用ES6。请参阅Great, how do I use it now?
下的部分