Why I am not a Fan of TypeScript

The majority of my work colleagues like TypeScript a lot. I do not like TypeScript, and I’ve been trying to figure out why.

It’s quite difficult to describe exactly what TypeScript is, but basically TypeScript is a language that adds features to JavaScript, then a transpiler converts your TypeScript code into plain JavaScript.


In other words, there’s nothing you can write in TypeScript that you can’t write in JavaScript. In my opinion, the two main things that TypeScript adds are classes (and interfaces) and types. In TypeScript you can write code that looks like a class (or interface) but gets translated into ordinary JavaScript. In TypeScript you can write code that looks like you’re declaring a type (like string) to a variable. The transpiler does some static checking to see if your code has any inconsistencies.

All this sounds good in principle, but for me at least the extra effort involved in writing TypeScript and managing those .ts files outweighs the benefits I get. Put another way, TypeScript just doesn’t feel right to me.

Let me emphasize that among my colleagues my opinion is definitely the minority view. Also, even though jQuery is a similar wrapper-library around JavaScript, I like jQuery a lot – I’m guessing it’s because I just embed jQuery code directly into my JavaScript files.

This entry was posted in Miscellaneous. Bookmark the permalink.