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

This sample does not compile `package quickstart; import static def.dom.Globals.alert; import static def.dom.Globals.document; import static def.jquery.Globals.$; import java.util.ArrayList; import java.util.List; import org.w3c.dom.NamedNodeMap; import def.dom.HTMLCollectionOf; import def.dom.NodeListOf; import def.dom.Node; import def.dom.HTMLDivElement;...

**Tested with the live sandbox (version 3.0.0):** ```java package org.jsweet; import static def.dom.Globals.*; public class HelloWorld { static class Class1 { int val = 1; } static class Class2 extends...

```java const newFire = FireTaskDto.createFireReport( fireReasons.map(ordinal => FireReason[ordinal]), FireType[FireType.CLASS], fireNote, reporter, studentId, classroomInfo, ) // have to manually add this newFire['__dto_class'] = "com.ktbyte.dto.FireTaskDto"; fireService.reportFire(newFire, result => { onToggle(false); setIsProcessing(false); })...

Trying `import javax.crypto.Mac;` JSweet shows error: `Line 261: cannot find name 'javax'. Did you mean 'java'?`

welcoming contributions
feature request

I am trying to transpile these lines of Java into JS: ``` double[] data = {//an array of doubles}; Long hash = 0; if( data != null ) for( double...

bug
welcoming contributions

The following code should raise an error that the method reversed doesn't exist: ``` public class ThingA { private static Comparator z = build().reversed(); public static Comparator build() { return...

bug
welcoming contributions

``` public class ThingA { static void m(Step step) { step.apply(); } @FunctionalInterface public interface Step { void apply(); } } ``` produces the error `expected 1-2 arguments, but got...

bug

For example ``` public class ThingA { public static void m() { HTMLDivElement e = null; e.insertBefore(null); } } ``` produces the error `expected 2 arguments, but got 1`

enhancement
welcoming contributions

To get this to cause an error, I put the two classes in different packages. The full qualification appears to be missing if they're in one package too but it...

bug
welcoming contributions

``` public class ThingA { static void somefunc(ThingA a) { a.new InnerY(); } public class InnerY { InnerY() {} } } ``` produces ``` namespace jsweettest.moda { export class ThingA...

bug
welcoming contributions