Assuming that you have your local environment setup for programming(text editor, terminal access, ect…) setting up the compiler itself only requires two steps.
- Make sure that you have Node.js installed(available at “https://nodejs.org”)
2. Run the command: “npm install -g typescript” in your terminal
Right now all of our files are blank so let’s add some basic test content in our ‘index.ts’ file.
Time to compile- in the terminal we now run the command “tsc index.ts” and when we look at our ‘index.js’ file we can see that it has been populated with the same code that we have in the ‘index.ts’ file.