3 ms·
clickable link: https://www.jsweet.org/ https://www.jsweet.org/ - A transpiler from Java to TypeScript/JavaScript
by mtmail 3y ago
clickable link: https://www.jsweet.org/ https://www.jsweet.org/ - A transpiler from Java to TypeScript/JavaScript
- karmakaze 3y agoI can see the value if working with js, less so with ts. I'd done some work with GWT in the past and the Java -> js part worked great. A problem I can see when working with ts is not having the ts libraries imported into Java's types.
- renaudpawlak 3y agoJSweet comes with a TS definition files to Java translator (.d.ts to .java). So when you have the TS definition file, you can generate the correspond Java API on-the-fly or use a pre-translated/pre-compiled definition in so-called "candies". The candies are just here for typing in Java and ensure that you have the exact same API as in TS. Then JSweet generates intermediate TS code, which is compiled against the original TS definition. This 2-step transpilation process ensures that the generated code is correct and well-typed. In the end, you can work either directly with the JS code or the TS code depending on what you need.
- karmakaze 3y agoOk now that's cool!