Typescript - tsc (official compiler)

About

tsc is the official compiler that transform/compile a typescript file into a javascript script

Management

Install

  • Locally for a project
yarn add typescript  --dev
  • Global
# yarn
yarn global add typescript
# npm
npm install -g typescript

Compilation

  • With the global tsc cli
tsc typescript.ts
ls
typescript.js
  • With the playground
  • In the browser: The typescript compiler is written in Typescript, so you can load the compiler (typescript.js) into your browser (roughly 250 KB).

Option

Compiler options can be set:

The Playground has a GUI

API


Powered by ComboStrap