Show List

Environment Set Up

Following applications/tools are required to create and run a TypeScript program.

Text Editor

Text editor will be required to create TypeScript (.ts extension) file. Example Notepad, Notepad++, VS Code. 

VS Code is preferred as it also has code completion to help write the code. If you do not already have it installed on your computer, you can download and install VS Code from official website https://code.visualstudio.com/download.

Node.js

Node.js is used to run the JavaScript code without a browser support.

To check if you already have Node installed on your computer, run "node -v" command from command line:
C:\Users\yourusername>node -v
If Node is already installed, you will see the installed Node version
C:\Users\mail2>node -v
v16.10.0
If Node is not installed you would see command not recognized message. In that case follow the Node.js installation instructions for your operating system from the official website https://nodejs.org/en/

TypeScript Compiler

TypeScript Complier (tsc) is required to convert TypeScript code to JavaScript code.

Run below command on command line editor to check whether the TypeScript is already installed
C:\Users\mail2>tsc -v 
If the TypeScript is installed, it will display the version number. 
Version 4.8.4
If the TypeScript is not installed, you will see 'tsc' is not recognized message. In that case run command "npm install -g typescript" to install the TypeScript and compiler.
C:\Users\mail2>npm install -g typescript

    Leave a Comment


  • captcha text