Gain the Edge: How Learning TypeScript Can Propel Your Front-End Career

In recent years, TypeScript has gained significant popularity and has become one of the fastest-growing programming languages. You don't need to learn it, but it would be a great asset if you did.

Sarah Drasner Quote - State of JS 2022

The quote above is from the State of JS 2022 conclusion.

What is TypeScript, and how can it benefit me?

TypeScript is a programming language developed by Microsoft that extends JavaScript by adding static types. It is designed to improve the development experience of large-scale JavaScript applications by providing enhanced tooling, better code organization, and improved error detection.

Many companies have already adopted TypeScript, requiring candidates to have experience using it. Learning TypeScript will increase your chances of landing a job and give you leverage in negotiating your salary, as learning React does. The more tools you know and master relevant to a job's description, the better your odds of securing that job.

JavasScript - TypeScript Balance

The graph above shows how the most significant number of respondents (20.7%) write only TypeScript, compared to 8.2% writing only JavaScript. See it in more detail on the State of JS 2022.

To TypeScript or not to TypeScript?

We must invest time and effort whenever we need to learn something new. It's perfectly normal to ask ourselves whether investing these resources is a good decision. Below are some common concerns that might prevent you from learning TypeScript.

1. I will forget JavaScript by learning and using TypeScript.

If you think that by learning TypeScript, you'll forget JavaScript, think again. TypeScript is a superset of JavaScript, which adds optional types to it. It is still JavaScript. TypeScript will help you be more thoughtful about your code, as you must consider all the data types. It will be hard to introduce unexpected bugs since your code won't allow that. TypeScript will empower you to write more scalable and maintainable code as your codebase increases. When using TypeScript, you still need to write JavaScript.

2. Many jobs don't require TypeScript. I don't need to learn it.

Indeed, many jobs don't require TypeScript. You can continue to apply for these. I'm not saying you should drop everything and learn TypeScript before you apply for the next job. Learn it on the side or at your current workplace, and increase your chances of landing a new opportunity.

3. TypeScript looks confusing. I don't like it.

That's OK. There are many things people don't like but decide to do it anyway. Remember why you're doing it: you want to be a better developer and better prepared. As with many programming languages or concepts, it can be daunting if you don't get the basics right. Once you understand the basics, things will make sense. When you get used to it, you realize how writing JavasScript without typings makes little sense.

4. Many companies still use JavaScript; I don't need to know TypeScript.

You could also say, "Many companies still use JQuery; I don't need to learn a modern JavaScript framework like React, Vue, Svelte, etc.". This is usually a knee-jerk reaction we tend to have to new things. It is probably our lizard brain trying to protect us and save resources. We don't need to preserve these resources but invest them in learning something new that will help us in the future.

I'm sold. How can I learn TypeScript?

JavaScript syntax is valid TypeScript, meaning you can take any working JavaScript code and place it into a TypeScript file; it should work the same. It means you can learn TypeScript progressively by configuring it in an existing project or starting a new one from scratch.

You don't need to master advanced TypeScript techniques to add it to your skill set. As with any skill, there's always room for learning more. Know enough to be confident. I like to think within the "80/20 rule" framework regarding learning, knowledge, and skills. Generally, we use 20% of the information 80% of the time. Learn that 20% and grow from there.

There are many learning styles. Some prefer learning by doing, others by reading documentation, online courses, or a mix. Whatever your preferred learning style, master the basics and write code to build a strong foundation. The more you write, the better you'll become. What can you do today to improve your TypeScript skills?

Are you still trying to figure out where to start? Head to the TypeScript Roadmap and get a high-level overview of everything you need to learn about TypeScript.

Subscribe for more like this!

Drop your email below and I'll send you new stuff to your inbox!

No spam, ever. I respect your email privacy. Unsubscribe anytime.

Read more similar articles