Hacker News new | ask | show | jobs
by jessekv 595 days ago
If you are mostly writing JS to enhance a web page, I would say it is good enough.

I recently to wrote an application that interfaces with a non-trivial Json API which returns many different data types.

I defined all the interfaces produced by the API in TS, and once this was done the app practically wrote itself with hardly any surprises.

With the data structures documented, the logic is concise and readable. To me, this is "better Javascript".

Of course, if the API changes, randomly all the types are a lie... it would be nice if I could reuse the types to do some runtime validation of fetch results, pydantic-style.