Amy Blankenship
1 min readMay 29, 2023

--

I think what your post leaves out is that no one is able to write your "improved" version of the promisify type on day one. How long did it take you writing Typescript before you were able to look at that kind of problem and think to yourself "That needs Parameters and ReturnType"? From your example, it was _after_ you learned to write the manual version--which still takes considerable experience and skill.

So let's say, best case, that your team _is_writing these kinds of complex types. Yes, maybe it prevents you from checking in a bug--but would that bug take more time to fix than it took you to come up with the type? There's no way to know.

Then, if you look at how many people are writing about how "easy" TypeScript is, you know that they're _not_ writing these kinds of types, because no one who writes them think TS is easy. And even people who write them go through an extended period of time where they're not yet able to write them (either because they don't see how cranking down the type would help them or just they can't figure out the syntax before deadline), so a lot of codebases have spotty quality on their types.

I agree with your mentor, for most teams. If you have a team that's really committed to quality where the people on the team are expected to be there for over a year, you potentially could get enough ROI to make it worth it. But even then, it's iffy.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (2)