Almost two years ago I started a new greenfield project in a small agile team. Microservices, docker, react, redux, all that fancy stuff.

I had some experience with similar front-end technologies, because I had spent the previous year on a pretty big react application written by over 20 front-end developers. It was quite challenging for me. We had a lot of issues back then: problems with models cohesion, growing code base, complex and hard to maintain api’s, inconsistent interfaces, hard to track runtime exceptions.

I decided to find some solution to those issues before starting the new project. I thought that maybe we had problems, because the language itself is a little bit too elastic and forgiving. You can type almost everything and because there is no compilation stage, no constraints and pre-runtime code validation, your bundle might contain severe bugs.

Then I’ve encountered Flowtype and TypeScript. After short evaluation I decided to go with TypeScript and now, after two years, I can tell you – that was a good choice for the project and my career. But if you think that the life of a TypeScript developer is a bed of roses you’d better read on.

In this article I don’t want to elaborate about TypeScripts’ features or dive deep into project setup. There are lots of great resources about that on the Internet (for example official TS documentation: https://www.typescriptlang.org/docs/home.html). It is not an introduction for the beginners either.

It is a story about upsides and downsides of everyday work with TypeScript. I would like to describe my worst experiences with TypeScript and, on the other hand, features I consider the most useful. It’s about pros and cons, tradeoffs and benefits, so let’s start.