jsweet icon indicating copy to clipboard operation
jsweet copied to clipboard

A Java to JavaScript transpiler.

Results 130 jsweet issues
Sort by recently updated
recently updated
newest added

Hi guys! When we create a TranspilationRequest we want to use the java.util.Scanner; We use Java Files to process the response and transpile it to TypeScript. But we always need...

special object properties "__class" and "__interfaces" When tranpiling java to javascript jsweet is creating for every class a special object properties called __interfaces and __class. i.e. from [here](https://github.com/cincheo/jsweet/blob/master/doc/jsweet-language-specifications.md#interfaces) "This interface...

For loops variables should be humain-friendly when possible. Array's forEach function shall be used when possible.

I was surprised to see that event.target type EventTarget doesn't have any more than listener handling. Why is it like this, although srcElement (which is [an alias to target according...

`if (!e.toString().contains("EOF"))` this java code compiles to: `if(!/* contains */e.toString().indexOf("EOF") != -1)` which gives an error `ERROR output:55 - operator '!=' cannot be applied to types 'boolean' and '-1' `...

Java/Javascript String element (chars) are 2 bytes. String getBytes() function only separate the characters (but they bytes are not). And also String(byte[]) constructor is missing, and there are no any...

When I ran the j4ts test It wrote the following: `Failure: invalid assertion: truectes!=true99tes` I analyzed the problem and simplify it: ``` String str = ""; char c = 'a';...

`int with = 0;` is not compiling. In javascript "with" is a keyword, which is not accepted to be a variable name. The other restricted keywords translated with prefix "__"....

consider the following Java code: ``` class X { public void a() {} X() { a(); } } public class Start { public Y v = new Y(); class Y...

This code prints (in java) "2" ``` String[] splitted = "a|b".split("\\|"); System.out.println(splitted.length); ``` But the compiled javascript version prints "1" ``` let splitted = "a|b".split("\\|"); console.info(splitted.length); ``` This is because...