TypeScript Setup

by Sudipta Deb | Aug 26, 2022 | TypeScript, Web Technology | 0 comments

TypeScript Setup

Below are the tools you need to set up with the environment to start writing TypeScript code:

  • Node.js – Node.js is the environment in which you will run the TypeScript compiler.
  • TypeScript compiler – a Node.js module that compiles TypeScript into JavaScript. If you use JavaScript for node.js, you can install the ts-node module. It is a TypeScript execution and REPL for node.js
  • Visual Studio Code – It is a code editor that supports TypeScript. However, you can use your favourite editor.

If you use VS Code, you can install the following extension to speed up the development process:

  • Live Server – It allows you to launch a development local Server with the hot reload feature.

Install Node.js

Installing node.js is very simple. You just need to follow the below steps -

  • Download the latest node.js version from the official website. 
  • Execute the downloaded package and follow the steps.
  • Verify the installation from your terminal. by executing the command node -v. If you see the version you downloaded, it means the installation is successful.

Install TypeScript

Once you install the Node, you can install the typescript compiler using the following command from the command prompt

npm install -g typescript

Install Visual Studio Code

Next, we will need a Code editor. You have many choices here. For this tutorial, we will use Visual Studio Code. You can download it from the official  https://code.visualstudio.com/download

Visual Studio Code

Configure Visual Studio Code (IDE) for JavaScript Development

You can read my previous post to know how you can set up your Visual Studio Code for JavaScript development. It is valid for TypeScript as well.

https://sudipta-deb.in/2020/07/how-to-configure-visual-studio-code-ide-for-javascript-development.html

Install Live Server 

To install the Live Server extension, you follow these steps:

  • Click the Extensions tab to find the extensions for VS Code.
  • Type the live server to search for it.
  • Click the install button to install the extension.

0 Comments

Leave a Reply

Written by Sudipta Deb

Enterprise Cloud Architect, Content Creator, 20x Salesforce Certified, 1x Google Cloud Certified, 2x Copado Certified

Related Posts

Introduction to TypeScript

Introduction to TypeScript

What is TypeScript A superset of JavaScript is TypeScript. The foundation for TypeScript is JavaScript. You begin by writing the TypeScript code. The TypeScript code is then converted into standard JavaScript code using a TypeScript compiler. Once you have the basic...

read more...

0 Comments

Leave a Reply