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 has been 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)
....
The text was updated successfully, but these errors were encountered:
On the example page (https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) for typescript there is some simple code. This code cannot be compiled by typescript4j.
This results in the following error:
The text was updated successfully, but these errors were encountered: