Every javascript developer should learn Typescript 🔥🔥and here is why
Tags: javascript, typescript, webdev, productivity
Published: 2022-08-11 09:47:00

If you write javascript, I'm sure you've at least heard of TypeScript language. Either somewhere online, Job posts or anywhere else. You might be wondering about what it is and what it brought to us that makes is so popular, whether it's worth learning or not, may be about it's commmunity and more. 

This cool stuff called Typescript is rapidly dominating the web 🤞 and it should in my opinion due to several factors

Learning typescript has been one of the ever winning decisions I could have made in my career - no exaggeration here. In the last three years, every javascript project that I have contributed to, was using typescript in one way or the other.

When we generally pick any new language or technology we consider many points like its flexibility, how useful it is? What would be the future of it? etc. 
Instead of presenting only one side of the story or doctored facts, this article will solve all your queries related to TypeScript.

Without further ado, 
![Let's get started](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3d403atl8xftw3y08iiq.gif)
 
## What is typescript

Starting from the very basic, Typescript is Microsoft’s open-source project which could be referred to as the superset of JavaScript. 
TypeScript builds on top of JavaScript. First, you write the TypeScript code. Then, you compile the TypeScript code into plain JavaScript code using a TypeScript compiler.

Once you have the plain JavaScript code, you can deploy it to any environments that JavaScript runs.

TypeScript files use the .ts extension rather than the .js extension of JavaScript files.

Here is how the flow goes:

![typescriptflow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17xmv6h9tr8fy11g2r6x.png)
 
The main goals of TypeScript are:

- Introduce optional types to JavaScript.
- Implement planned features of future JavaScript, a.k.a. ECMAScript Next or ES Next to the current JavaScript.

That's it,

> TypeScript brings the future JavaScript to today

In simple words,
![typescript power](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06o1461yrg2m82ko42x7.png)
 
Here are is a combination of five reasons to why you should learn typescript:

## 1.Typescript's domination in the industry 

Typescript is dominating the web as javascript did, nowadays due to the beauty of typescript, both small(start-ups) and big companies are using typescript

Google, Facebook, Microsoft, and many more big names are working on TypeScript and using it. So it really excites so much that you are working on projects with the technology which is having global scope.
 
You might be wondering what that means, but if you're searching for a job you will need to apply to the jobs posted by some of these companies and start-ups, and so you will be required to have a knowledge of typescript to work with them.

## 2. Growing and supportive community

From the time Typescript has been introduced, it is gaining popularity with time. The curve for its popularity is really great if we see the last few years. As we know that Microsoft is building many efforts for growing community Typescript.

If you look at online developer surveys such as those for stackoverflow, you will see that there is a big community behind typescript and this is increasing steadily.

## 2. The power Typescript adds to javascript

Typescript is unbeatable and brings super powers to javascript believe it or not.

> It improves your productivity while helping avoid bugs.
> By using types, you can catch bugs at the compile-time instead of having them occurring at runtime -Javascript didn't have this.

Here are the main awesome features that typescript brings to the world of javascript devs:

**Object-Oriented Programming:** TypeScript provides all features of Object-Oriented Programming where you can form objects because TypeScript provides inbuilt support for classes, interfaces, and many more features of OOP. It helps in designing and implementing them with clean and scalable code. This feature of TypeScript separates it from others and it makes the code more readable which helps to easily maintain and alter code.

**Supports all JavaScript libraries:** Typescript supports all the JavaScript libraries and you can change your existing JavaScript project into TypeScript by just changing the extension of the file .js to .ts.
 
**Static Typing:** Typescript takes the robust code at another level to write scripts which helps in writing and maintaining larger codes especially in the case of scripting which helps in analysis of code. You don’t have to wait till the runtime to find bugs in your code which reduces complications of designing. It promotes dependable refactoring and makes it faster.

 
**Dependency Injection:** Typescript allows you to create objects outside the class and provide those objects to a class in many different ways.
 
**Other Features:** Typescript compiles the code into the version of JavaScript which helps the code to run on all browsers. TypeScript also has Intellisense which is really helpful in giving hints for code. It supports encapsulation, abstraction, polymorphism, and other OOP features. Typescript code is more readable, clean, and scalable. Typescript is a strongly typed language that supports prototypes, dynamic types, and constructor functions. Also, it helps in changing the document using API. The module is another amazing feature of Typescript just like namespaces.

Sounds more powerful 😉, right!
![Typescript is powerful](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/58lg2idvriayz8egh2im.gif)


## 4. It's fit with popular javascript frameworks 

Another main reason behind the popularity is that Typescript feels amazing when you work with Vue, Angular,NodeJs and React. Many libraries like Redux, Style, Components, React intl, formik is supported by Typescript which makes Typescript the choice for the larger community. 

![masterpiece](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gflmq3e4r0174wtatza9.gif)
🤞🤞

So you can simply conclude that Typescript’s magic is working all over the world. Go with it and feel the vibe 😉. Many developers think that the only reason why they prefer javascript is that you can not work on React, NodeJS, Angular, and Vue if you are working with Typescript. Relax, Typescript supports all of them so you don’t have to worry about this.

## 5. Easy to start and Adopt

Yeah, many jobs are now requiring developers to know TypeScript.
But don't be alarmed – if you already know JavaScript, you will be able to pick up TypeScript quickly. 

Typescript is just an enhancement of javascript (Javascript and more), it's easy for javascript devs to get used to.

## 7. Conclusion

That's a few of more reasons to why I think you should learn Typescript if you're using javascript.
If you consider the above points, I beleive it will help you in building a career in development and TypeScript will give an edge to your career according to my exprience and facts.

## What's next

Hooray! I'm done
It's your turn. Go on in the comment section and tell us what you think. Have you ever tried typescript, share us your exprience.

**Let me know if you would like me to share 5 big tutorials on web that will help you master typescript in few days**

Stay tunned,

Let me keep vibing with my typescript here 🤣🤣
![Loving typescript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2m4mdwpwfdolko8zfxu.gif)