TS01 : How to Setup Typescript Project

·

2 min read

TS01 : How to Setup Typescript Project

Note: I will be learning TypeScript for the next 10 Days and I am going to document my journey of it with blogs.


In this article, We are going through how to set up a TypeScript Project.

What is TypeScript

TypeScript is a Strongly typed language, unlike Python, and Javascript. TypeScript builds on Javascript. Typescript has all the features which Javascript has, and It also has some additional features.

Installing Node

Go to https://nodejs.org/en/ and install node.

Now, Go to the terminal window and run this command.You have to type password after running this command.

sudo npm i -g typescript

npm is Node Package Manager. We can install third-party packages with it.

In the above command,

  • We are using sudo for superuser permission.

  • i is the short form for installation,

  • -g flag is used for installing typescript globally.

To check the TypeScript version

run this command to get the TypeScript Version

tsc -v

Executing TypeScript File

  1. Open any editor of your choice.

  2. Create folder.

  3. Create index.ts file.

  4. Run tsc index.ts terminal.

  5. Wallaah !! Your index.js file is now created.

I hope this blog has brought knowledge to you about TypeScript. For more such articles follow me and subscribe to my newsletter.

Also, Follow Me on Twitter and Linkedin

Thank You ❤️.