Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Typescript compiler for Java
JavaScript Other
Latest commit 6772aa0 @martypitt Merge pull request #8 from seratch/patch-1
Updated latest version on README

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


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.

Something went wrong with that request. Please try again.