Skip to content

TypeScript Compiler

angelozerr edited this page May 15, 2016 · 8 revisions

TypeScript Compiler

TypeScript IDE provides 2 means to compile ts files :

  • with a launch Run As -> Compile TypeScript.
  • when ts file is saved (compile/build on save).

With Launch

Do Run As -> Compile TypeScript

On save

To compile/build on save you need to enable Compile on save? in the project properties TypeScript/Compiler:

Add TypeScript Builder

Please note that TypeScript menu item appears if your project is a TypeScript project. See BuildPath for more information.

This action add the TypeScript Builder to the project:

CompileOnSave TypeScript Builder

After that you need to activate Project / Build Automatically:

Build Automatically

to execute TypeScript Builder when any ts files are saved.

Compile on save

Compile on save means compile ts file which is saved.

Here a demo with compile on save:

CompilationOnSave Demo

Build on save

Build on save means compile the whole ts file of tsconfig.json when a ts file (which belongs to tsconfig.json) is saved. Pay attention, it can be slow, but if you use "outFile" insid eyour tsconfig.json, it can be helpful.

Here a demo with build on save:

BuildOnSave Demo