Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is quite a lot missing in TypeScript types (e.g. integer or uint types would help a lot in typical tasks such as accessing an array or iterating a loop; even if they are stored as floats, I want to make sure someone won't take 2.5 element of a list to get undefined).

Still, for me, TS is a day and night difference with JavaScript. While it does not solve everything, at least I know what is code about. E.g. when I see `volume` in plain JS the first question I ask myself is: is it a number, plain object, instance of a class, a simple boolean, or what?

It is not only about tests. It is also about readability.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: