Hacker News new | ask | show | jobs
by stiiv 788 days ago
In my opinion, JavaScript's main advantage is that it can be run in browsers in addition to other (i.e. server) environments.

If you're building something simple, and the type/shape of function parameters is either very obvious or very well-guarded, TypeScript's returns diminish.

However:

As a reviewer of complex code, I want to see annotations so that I can better understand what I'm reviewing.

As an author of complex code, I want to clearly communicate the intent of functions I write, so that they are not misused by other developers.

As someone who supports the use of my software, I want to reduce errors by guaranteeing the correct types/shapes of function arguments.

...and I'm just getting started. These are all very compelling needs in my experience.