TypeScript’s Coming of Age and My TypeScript Moment

Image for post
Image for post
Photo by David A. Good (CC BY-NC-ND 2.0)

TypeScript has really come of age. Type definitions are widely available, the community has grown by leaps and bounds, the productivity gains from tooling are off the charts, compilation times are fast, and adopting TypeScript is easier than ever.

My TypeScript Moment

For the past few years, I was never really convinced to go all-in on TypeScript. I had tried it out and become frustrated by the lack of type definition availability and long compilation times slowing down the development feedback loop. But the nail in the coffin was a cryptic TypeScript error that broke my project’s build. I spent half an hour researching it before finally giving up.

Then recently, I revisited some utility code I had written in pure JavaScript only about two weeks prior. The idea was to make a quick enhancement — it should’ve taken 5 minutes max. But I had to spend the first 5 minutes combing through the code looking for what fields callers expected to exist on the object returned from one of the utility functions. Granted, had my unit test coverage been better, it would have served as documentation for the code. But even then, figuring out the required shape of the object would have required hunting through unit tests.

So here’s my advice

If you can start with TypeScript from the beginning of a new project, do it. Your future self will thank you. Your team will thank you. There’s really not much of a downside.

And if you’re working on an existing project, start incrementally adopting Typescript today. It’s easier than ever. See my article about that here:

Software engineer crafting full-stack, cloud-native solutions for enterprise

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store