Linn Linn Htun
Linn Linn Htun
AvatarLinn Linn Htun

TypeScript (Setting Up the Development Environment)

August 7, 2023

TypeScript (Setting Up the Development Environment)

Setting up a TypeScript development environment is the first step to writing type-safe JavaScript applications. This post walks through installing Node.js and the TypeScript compiler, configuring VS Code with TypeScript extensions, creating your first tsconfig.json, and running your first TypeScript program.

Setting Up the Development Environment

First of all, we might need to install node.js latest version on local machine.

https://nodejs.org/en

After installing node.js, we have to install typescript globally as below:

npm i -g typescript

if have any permission issues on local machine, run below cmd:

sudo npm i -g typescript

*sudo meaning super user do

 

We can check typescript version after installation successfully :

tsc -v

 

 

 

Frequently Asked Questions

How do you install TypeScript?

Install TypeScript globally via npm by running npm install -g typescript, which gives you access to the tsc command; you can verify the installation with tsc --version.

What editor is best for TypeScript development?

Visual Studio Code (VS Code) is the most popular editor for TypeScript development due to its built-in TypeScript support, intelligent autocomplete, inline error reporting, and rich ecosystem of TypeScript-related extensions.