Member-only story
How an Anti-TypeScript “JavaScript Developer” Like Me Became a TypeScript Fan
My journey from not liking TypeScript to loving it
In this article, I will discuss my journey from being an anti-TypeScript developer to a developer who now couldn’t think of going back to the plain JavaScript world. Maybe my thoughts can help someone who is in the same boat as I was in a few years back.
Why Was I Anti-TypeScript?
I always felt that adding types to functions/variables and satisfying the TypeScript compiler was over-engineering and didn’t provide any meaningful benefits. Also, it felt slow to work on, as I would always get compilation errors that were hard to understand. I would scratch my head trying to figure out the problem. This caused some frustration, and I started hating TypeScript.
The other reason was advanced TypeScript concepts like generics. They were very hard to understand and I started feeling like I was in the Java world, where every piece of code is strongly typed and overwhelming. Even simple code like the snippet below scared me when I started learning TypeScript:

Because of these reasons, even though I was learning TypeScript by watching tutorials or reading books, I never worked on any enterprise application that was written in TypeScript. In fact, I used to choose JavaScript over TypeScript (if there was a choice) for take-home assignments as part of the interview process with companies.
However, when I moved to my current role, working on JavaScript was not an option, as all the apps that I was going to work on were written in TypeScript (with only legacy code in JavaScript). As expected, it was initially overwhelming for me and my hate for TypeScript was increasing. But after a couple of months, I eventually understood the benefits and reasons why someone should prefer TypeScript over JavaScript. I have listed them in the following section.