Better HN
topnewbestaskshowjobs
Log inSign up

throwaay2322u43

2 karma · joined Nov 4, 2022 (4y ago) · 2 submissions

Submissions

comment 4y ago · link · parent

> TS has a powerful Generics syntax that cannot be duplicated in a code comment.

This is false though, but admittedly not documented well.

comment 4y ago · link · parent

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