You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 4, 2021. It is now read-only.
public class TypeScriptTest {
private static final String code =
"function greeter(person) {\n" +
" return \"Hello, \" + person;\n" +
"}\n" +
"var user = \"Jane User\";\n" +
"document.body.innerHTML = greeter(user);\n";
public static void main(final String... args) {
final TypescriptCompiler typescript = new TypescriptCompiler();
typescript.setEcmaScriptVersion(EcmaScriptVersion.ES5);
typescript.compile(code);
}
}
This results in the following error:
[ Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.12.6; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13 ]
[main] ERROR com.mangofactory.typescript.TypescriptCompiler - Failed to initialize Typescript compiler
error on line 652: missing name after . operator
Errors.abstract = function () {
org.mozilla.javascript.EvaluatorException: missing name after . operator (typescript-0.9.1.1.js#652)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
....