In August 2019, reddit user zzstormriderzz asked this question.

Having read “You don’t know JavaScript,” by Kyle Simpson, zzstormriderzz felt that people who know JavaScript “inside and out” would not need to use TypeScript. They believed that “TypeScript is for people who want to avoid unexpected behavior in JavaScript” because “they don’t know that those behaviors are actually expected.”

I have used JavaScript daily since 2003. I prefer TypeScript. I think of TypeScript as having some unit tests built in. If I change an interface, not only will transpilation test that change to make sure all my code supports it, but my editor will run these “tests” locally and highlight the exact characters that are causing the “tests” to fail as I type.

The former is unbelievably useful for large code bases where an interface change resonates across countless files, and you are bound to forget to account for one — your comprehension of the JavaScript language does not help you here.

The latter is useful at all times. In my opinion, it speeds up development by essentially telling you what code you have to write next. It’s not a huge improvement, but it keeps you on track and wards off context shifting, such as a coworker interrupting you to ask a question. Where was I? TypeScript tells you that your function needs to return the other of its two cases. Cool.

Most importantly, one developer being an expert in JavaScript is not good news for a shared code base with juniors or other teams. It is not maintainable code to be “clever.” Doing something neat and powerful is how your code gets broken when other people try to contribute to it. “Rock star” developers are a bad thing. It does not matter how well you know the language. It matters how well your code can be interpreted and modified by other people. TypeScript helps with that.