by adrusi · 6y ago · 0 comments
Not mentioned: type annotations serve as a form of documentation that gets statically verified. The verification strategy has some cracks, and there's a (fairly small) chance that the documentation will end up misleading. But API documentation for javascript projects generally sucks, and typescript helps to fill a lot of the common gaps.
You can already write decent docs in plain JS, but I've found that having the types already documented by the compiler helps devs move up that level of thinking automatically.
That said, the appropriate reaction is to laugh louder the longer they make the claim.
It's very likely what's driving adoption right now.
There's plenty of people saying that it effectively augments documentation, and provides a form of it that's quite useful.