title: Convert TypeScript to Java
body: <p>I've been writing TypeScript recently, for running in a browser. 
  What I'm finding I want to do is run the same code from within a Java application. I have a complex piece of logic I want to write once and use in a JavaScript environment within a browser, and within a Java desktop environment. Now I know that I can host javascript from within java, but what I'm wondering is whether there is a way of converting TypeScript into pure java code?</p>