How to Install Typescript
In this article, we will see the process of installing Node.js. After that, using the Node Package Manager, we will install TypeScript.
For this tutorial, we require a computer with an active internet connection. This will enable us to progress with the installation process
Steps to Install Node.js
Let us discuss the steps required to install Node.js:
Step 1: Firstly, we need to go to the node.js website:
Step 2: Then, we need to download node.js installer by clicking the Current version button:
4.5 (2,691 ratings)
Step 3: Once the download is complete, we need to open the downloaded file. Upon opening the file, we will see a Node.js setup wizard which will guide us through the rest of the process to install Node.js. Click on the Next button:
Step 4: After clicking the next button, the following screen will come up. This screen will display the license agreement. This shows us the End User Licence Agreement. This agreement mentions various terms of usage to which we need to adhere. It is recommended to read the terms carefully. The below screenshot shows how it would look:
Step 5: Once we have read the terms in the End User Licence agreement and is satisfied, we need to check the “I accept the terms in Licence Agreement” checkbox. Please follow the below screenshot. Once checked, we need to click the next button:
Step 6: On clicking the next button, the following screen comes up. This window asks us for a “Destination Folder” where we would like to install our Node.js operational files to. We need to enter the destination folder and click on the “Next” button.
Step 7: The next step is configuring our installation with some custom setup. Since our installation for TypeScript does not require any customization, we would simply click the Next button and skip to the next window.
Step 8: The next window is to optionally install the tools that are necessary to compile native modules. We do not require any such tools; hence, we skip to the next step by clicking the Next button.
Step 9: This step marks the final stage before the setups run into installing necessary files. We have to click the Install button now. This will install the Node.js required files and begin the installation process.
Step 10: After clicking the install button, the setup wizard will ask for administrative privileges. We grant the privileges and the setup begins. The below screenshot shows how it looks,
Step 11: Once the process is finished, we will have the following screen. Now click the Finish button. This marks the end of Node.js setup process.
Steps to Install TypeScript
Let us discuss the steps required to install TypeScript
Step 1: The next step is to install TypeScript. To do this we have to visit the following website:
On opening the web-page, we will see a download button. We have to click that download button.
Step 2: On clicking the Download button, the following page will open. We need to locate the Install script on the page.
Step 3: The install script will contain a command as below. Copy the following command:
npm install -g typescript
Step 4: Open the Node.js command prompt window from the start menu. This Node.js command prompt will be available only after installing the Node.js as instructed earlier.
Step 5: Once the command prompt window is open, we will see a screen similar to the following.
Step 6: Now paste the command that we copied in Step 3 above. It will look similar to the following screenshot. Run the command by pressing the Enter key.
Step 7: Now, it will begin to install Typescript. We will be able to see the progress in the command prompt window itself. Please see the screenshot for reference.
Step 8: Once the process is complete, we will see the following in the command prompt window. This marks the completion of TypeScript installation. Now we will be able to code and compile our TypeScript codes.
Conclusion: Install Typescript
With this tutorial, we can see that installation is very basic stuff for any person who wants to get their hands-on TypeScript. Not only it is easy to install TypeScript, but we can also practice and enhance our skills to make perfect use of this beautiful language.
This has been a guide on how to Install TypeScript. Here we have discussed steps to install Node.Js and TypeScript. You may also look at the following articles to learn more –