terrestris / java2typescript

Software to convert a Java program to TypeScript (targeted for JTS)
Apache License 2.0
1 stars 0 forks source link

Proof-Of-Concept #1

Open simonseyock opened 1 year ago

simonseyock commented 1 year ago

This is a proof of concept for a program that converts Java programs to TypeScript.

It includes a setup for fast TDD but still will be much work to be able to fully translate JTS.

Also it will soon run into problems with dependent libraries/utilities (for example java.util.PriorityQueue). I would look into java2estree for inspiration.

@bjornharrtell, @marcjansen

bjornharrtell commented 1 year ago

Note that for Java builtins I've actually manually ported what JTS uses so that those APIs are available after transpilation. See fx https://github.com/bjornharrtell/jsts/blob/master/src/java/util/PriorityQueue.js.

bjornharrtell commented 1 year ago

That is to say, I would suggest not to try and transpile dependencies and instead assume those APIs exists as I do today and then manually port those classes to TypeScript.