Typescript compiler for Java
JavaScript Other
Latest commit 6772aa0 Nov 30, 2013 @martypitt Merge pull request #8 from seratch/patch-1
Updated latest version on README
Failed to load latest commit information.
pom.xml [maven-release-plugin] prepare release rel-0.4.0 Sep 7, 2013


Typescript 4J

This project Java library to compile Typescript files to Javascript files


Grab it from maven:


The below gives a simple example that compiles a very simple snippet:

// Instantiate the compiler:
TypescriptCompiler compiler = new TypescriptCompiler();

// Compile a string:
String output = compiler.compile("class Greeter { greeting: string; }");

// Or, compile and output to a file:
compiler.compile(new File("example.ts"), new File('output.js'));

// Compile using ES5 features:
TypescriptCompiler compiler = new TypescriptCompiler();
... etc ...

To learn more about Typescript, please visit http://www.typescriptlang.org


This project is HEAVILY borrowed from other really really smart people and projects.

Specifically, thanks to:

These projects made implementing this compiler very simple.


The goal of this project is to make Typescript compilation possible from Java, without a dependency on npm or node.

It's used in Bakehouse to facilitate server-side on-demand compilation of Typescript.

This project doesn't intend to be a replacement for the typescript compiler. Also, the primary focus of this project is not performance.