๐ŸŒ
TypeScript
typescriptlang.org
TypeScript: JavaScript With Syntax For Types.
TypeScript extends JavaScript by adding types to the language. TypeScript speeds up your development experience by catching errors and providing fixes before you even run your code.
Playground
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
Docs
How to use TypeScript-powered JavaScript tooling. ... Compiler configuration reference.
Download
There are other tools which convert TypeScript files to JavaScript files. You might use these tools for speed or consistency with your existing build tooling. Each of these projects handle the file conversion, but do not handle the type-checking aspects of the TypeScript compiler.
Handbook
Combined with JavaScriptโ€™s rather ... has made JavaScript development a difficult task to manage at scale. The most common kinds of errors that programmers write can be described as type errors: a certain kind of value was used where a different kind of value was expected. This could be due to simple typos, a failure to understand the API surface of a library, incorrect assumptions about runtime behavior, or other errors. The goal of TypeScript is to be a ...

programming language, superset of JavaScript that compiles to JavaScript

TypeScript (TS) is a high-level programming language that adds static typing with optional type annotations to JavaScript. It is designed for developing large applications. It transpiles to JavaScript. It is developed by โ€ฆ Wikipedia
Factsheet
Family ECMAScript
Designed by Microsoft,
Anders Hejlsberg,
Luke Hoban
Factsheet
Family ECMAScript
Designed by Microsoft,
Anders Hejlsberg,
Luke Hoban
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ typescript โ€บ typescript-compiling
Compiling TypeScript
November 3, 2021 - You will need to install the TypeScript compiler either globally or in your workspace to transpile TypeScript source code to JavaScript (tsc HelloWorld.ts).
๐ŸŒ
TypeScript
typescriptlang.org โ€บ play
TypeScript: TS Playground - An online editor for exploring TypeScript and JavaScript
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
๐ŸŒ
Programiz
programiz.com โ€บ typescript โ€บ online-compiler
Online Typescript Compiler (Editor) - Programiz
// Online Typescript Editor for free // Write, Edit and Run your Typescript code using TS Online Compiler console.log("Try programiz.pro");
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ TypeScript
TypeScript - Wikipedia
1 week ago - As TypeScript is simply a superset of JavaScript, existing JavaScript can be adapted to TypeScript and TypeScript program can seamlessly consume JavaScript. The compiler can target all ECMAScript versions 5 and above, transpiling modern features ...
๐ŸŒ
Node.js
nodejs.org โ€บ en โ€บ learn โ€บ typescript โ€บ transpile
Node.js โ€” Running TypeScript code using transpilation
tsc is the TypeScript compiler which will take our TypeScript code and compile it to JavaScript. This command will result in a new file named example.js that we can run using Node.js.
๐ŸŒ
daily.dev
daily.dev โ€บ home โ€บ blog โ€บ get into tech โ€บ compile ts to js: a beginner's guide
Compile TS to JS: A Beginner's Guide
February 4, 2025 - Compiling TS to JS: Use the TypeScript compiler to transform your code. Running and Debugging: Execute your JavaScript and troubleshoot any issues.
Top answer
1 of 11
38

The TypeScript compiler is built in TypeScript, and hence is available as a JS file (tsc.js) that can be run using just about any ES3-compiliant VM or JS implementation.

That said, the compiler's current file I/O infrastructure only supports Node and Windows Scripting Host file APIs. If you'd like to recommend for support for another environment, feel free to reach out to the team at our GitHub site (Formerly CodePlex)

2 of 11
25

Short version: use Node if you can. It's becoming unavoidable nowadays.

Maybe it's not the answer you want, but as everybody mentioned, the compiler is a JS file, so, your options are the options of executing a JS file.

In Windows, there are 2 obvious ones, Node, and Windows Script Host.

You know about node already, the other option is a component that comes with all versions of Windows (I think), you can do it like this:

cscript path/to/tsc.js source-file.ts

You can see all compiler options by just:

cscript path/to/tsc.js

On Linux I assume you should be able to use (in addition to node):

  • V8 standalone shell, replace node or cscript with v8-shell
  • ExecJS https://github.com/sstephenson/execjs
  • Any other JS runner available on the selected platform (another answer mentioned Rhino for example)

Update: Another answer suggests the compiler API is only compatible with node and Windows Script Host (cscript tool), so, if correct, then on Linux you'll need Node to compile TypeScript.

If you are looking for something like apt get tsc (or whatever the Linux/Mac package managers are like), I think there isn't.

I remember reading somewhere that the I/O is optimized for Node and Windows Script Host, so, if you have problems with options, you'll probably end up with Node if seeking platform independence.

Update: Another answer here confirms the same about compatibility.

Find elsewhere
๐ŸŒ
JetBrains
jetbrains.com โ€บ help โ€บ webstorm โ€บ compiling-typescript-to-javascript.html
Compiling TypeScript into JavaScript | WebStorm Documentation
WebStorm comes with a built-in TypeScript compiler. By default, it outputs generated JavaScript files and sourcemaps next to the TypeScript file.
๐ŸŒ
GitHub
github.com โ€บ microsoft โ€บ TypeScript โ€บ wiki โ€บ Using-the-Compiler-API
Using the Compiler API ยท microsoft/TypeScript Wiki ยท GitHub
TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Using the Compiler API ยท microsoft/TypeScript Wiki
Author ย  microsoft
๐ŸŒ
Playcode
playcode.io โ€บ typescript-playground
TypeScript Playground - Free Online TS Playground
PlayCode's TS playground supports ... prototypes, our TypeScript playground is the fastest way to write type-safe code. TypeScript compiles to JavaScript instantly in our JavaScript Compiler....
๐ŸŒ
GitHub
github.com โ€บ microsoft โ€บ TypeScript
GitHub - microsoft/TypeScript: TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript.
Starred by 107K users
Forked by 13.2K users
Languages ย  TypeScript
๐ŸŒ
OneCompiler
onecompiler.com โ€บ typescript
TypeScript Online Compiler
Getting started with the OneCompiler's Typescript editor is easy and fast. The editor shows sample boilerplate code when you choose language as Typescript and start coding. Typescript(JS) is a strongly typed programming language that builds on JavaScript, developed and maintained by Microsoft.
๐ŸŒ
Medium
medium.com โ€บ @leroyleowdev โ€บ understanding-the-typescript-compiler-and-its-options-63bbc3c494ab
Understanding the TypeScript Compiler and Its Options | by Leroy Leow | Medium
January 18, 2025 - The TypeScript compiler, often referred to as tsc, is responsible for compiling TypeScript code into JavaScript. It takes TypeScript sourceโ€ฆ
๐ŸŒ
JetBrains
jetbrains.com โ€บ help โ€บ idea โ€บ compiling-typescript-to-javascript.html
Compiling TypeScript into JavaScript | IntelliJ IDEA Documentation
IntelliJ IDEA comes with a built-in TypeScript compiler. By default, it outputs generated JavaScript files and sourcemaps next to the TypeScript file.
๐ŸŒ
GitHub
github.com โ€บ niutech โ€บ typescript-compile
GitHub - niutech/typescript-compile: Automatically compile TypeScript to JavaScript on the fly
TypeScript Compile automatically transforms your TypeScript code into JavaScript on the fly!
Starred by 306 users
Forked by 74 users
Languages ย  JavaScript
๐ŸŒ
Visual Studio Code
code.visualstudio.com โ€บ docs โ€บ languages โ€บ typescript
TypeScript in Visual Studio Code
November 3, 2021 - To compile your TypeScript code, you can open the Integrated Terminal (โŒƒ` (Windows, Linux Ctrl+`)) and type tsc helloworld.ts. This will compile and create a new helloworld.js JavaScript file.