Compiling TypeScript to JavaScript
Learn how to install TypeScript to our local machine and compile it to JavaScript.
We'll cover the following
Overview
Compiling TypeScript is very straightforward. First, make sure Node is installed on the local machine. We can verify by quickly checking the version of Node we have installed on our system with the command below:
node -v
Note: We can download Node.js from its official website.
Installing TypeScript
Let’s install TypeScript on our local machine via npm
(node package manager).
npm install -g typescript
When that’s done, we can then confirm the version.
tsc --version
Get hands-on with 1400+ tech skills courses.