Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
5.7.3
-
None
-
None
Description
Rhino has some issues with TypeScript due to typescript.ts using reserved keywords as property names (which is fine in ES6).
The latest version might work better, but the Context must be set to Context.VERSION_ES6.
Maybe there should be an option to configure Rhino, just like GoogleClosureMinimizerOptionsProvider
Related GitHub issues:
https://github.com/mozilla/rhino/issues/658
https://github.com/mozilla/rhino/issues/430
Update 2021-09-12:
David Taylor mentioned GraalVM as an alternative on the mailing list.
It's fully ECMAScript compatible and should be easy to integrate.
So far, only the Coffeescript and TypeScriptCompiler are using Rhino, and it's an internal package.
But GraalVM JS is 9x the size of Rhino.
Next steps should be a proof-of-concept, and discussion on the dev-list.