I’ve updated the article. TL;DR — a good spec/design review process coupled with sub-par testing coverage could lead to a result like the one Airbnb reported. Their finding is an interesting data point, but doesn’t invalidate the diminishing returns math in this article, or the cited study.
I’m speaking more about higher-kinded types and generics employing parametric polymorphism here. See transducers, lenses, higher-order maps, higher-order components, etc.
This reply makes me think you didn’t read the article. There’s a whole section on this topic I won’t repeat here. TL;DR, static types miss most bugs, and other measures catch most type errors, so TS brings very little bug prevention value.
Yes, the same way you would write them in d.ts files. Then declare it as the type for the variable you’re assigning the function to. Or just use d.ts files and keep your source in .js … then tell VS Code to check .js files.
“5.4% have used TypeScript and would not use it again, and 13.7% are not interested in learning TypeScript.”
5.4 + 13.7 = 19.1
I did round up a little, but to call it exaggeration is itself an exaggeration.