DEV Community

Cover image for Every javascript developer should learn Typescript 🔥🔥and here is why
TURINUMUGISHA Souvenir
TURINUMUGISHA Souvenir

Posted on

Every javascript developer should learn Typescript 🔥🔥and here is why

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

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

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

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

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
🤞🤞

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

Latest comments (1)

Collapse
 
muhireighor profile image
MuhireIghor

This article is really amazing I also have worked on some typescript project and I found it really cool and we really wait for your tutorials