HNHacker News
TopNewBestAskShowJobs

throwaay2322u43

2 karma · joined November 4, 2022

submissionscomments
throwaay2322u43··on Ask HN: Why JavaScript experts tend to not use TypeScript?
> TS has a powerful Generics syntax that cannot be duplicated in a code comment.

This is false though, but admittedly not documented well.

throwaay2322u43··on Ask HN: Why JavaScript experts tend to not use TypeScript?
1. Use `noEmit` if you don't want to use the transpiler -- You can also use babel.

2. Use a modern target, my transpiled code is 1:1.

3. You can use JSDoc type annotations, I use this for some projects.

4. TS works well in functional code bases. If you prefer JavaScript's dynamics, expect pain.

5. You can also use Flow.

6. Your sample size is 3