EOS Compiler Version Differences

All about the past, current and future webteases and the art of webteasing in general.
---
Post Reply
User avatar
snovise
Explorer
Explorer
Posts: 5
Joined: Sun Dec 09, 2018 11:08 pm
Gender: Male
Sexual Orientation: Gay
I am a: Switch

EOS Compiler Version Differences

Post by snovise »

I was working in the EOS editor, and I noticed that the compiler for the editor is set to a recent TypeScript version, but the actual compiler used when the tease is run is an older version of JavaScript.

For example, the compiler in the editor is fine with "let," "class," and even "enum" keywords (the last of which is TypeScript-exclusive), but the tease will break if you use any of these. It's confusing to be corrected into doing something that breaks the code.

I don't know who to contact about this, but it would be nice if the two compilers could be brought in sync.
fapnip
Explorer At Heart
Explorer At Heart
Posts: 431
Joined: Mon Apr 06, 2020 1:54 pm

Re: EOS Compiler Version Differences

Post by fapnip »

The current configuration for the script editor Eos uses will allow you to enter JavaScript and TypeScript that actually can't be run by the player, and the editor's linter won't highlight that code as errant.

Eos executes all author supplied script in a JS-Interpreter sandbox to prevent XSS, and other malicious attacks. JS-Interpreter only supports ES5, and there are no plans for ES6+ support, so we'll be stuck on ES5 for the foreseeable future.

I agree that it would be nice if Eos' editor could be set to lint/hint for ES5.

You could add a feature request here:
https://github.com/milovana/eos-issues/issues
User avatar
snovise
Explorer
Explorer
Posts: 5
Joined: Sun Dec 09, 2018 11:08 pm
Gender: Male
Sexual Orientation: Gay
I am a: Switch

Re: EOS Compiler Version Differences

Post by snovise »

fapnip wrote: Wed Mar 10, 2021 1:46 pm You could add a feature request here:
https://github.com/milovana/eos-issues/issues
Done, thank you. Really, ES5 isn't even an issue. It's not as convenient as ES6 because OOP is best OP, but it's not bad per se. My only issue is being corrected into doing something invalid.
Post Reply