Tutorials Videos Menu
Website Pro NEW

TypeScript Getting Started


TypeScript Compiler

TypeScript is transpiled into JavaScript using a compiler.

TypeScript being converted into JavaScript means it runs anywhere that JavaScript runs!


Installing the Compiler

TypeScript has an official compiler which can be installed through npm.

Learn more about npm, and how to get started here: What is npm?

Within your npm project, run the following command to install the compiler:

npm install typescript --save-dev

Which should give you an output similar to:

added 1 package, and audited 2 packages in 2s
found 0 vulnerabilities

The compiler is installed in the node_modules directory and can be run with: npx tsc.

npx tsc

Which should give you an output similar to:

Version 4.5.5
tsc: The TypeScript Compiler - Version 4.5.5

Followed by a list of all the Commmon Commands.