Hacker News new | past | comments | ask | show | jobs | submit login

At least Node.js has added experimental support that seems to do that: https://github.com/nodejs/node/pull/53725

But this is just an on-the-fly transpile(natively supported). It would be much better if JavaScript would go the Python route. For that they would have to extend the EcmaScript spec (to be safe) I guess.

Just using JSDoc is imho not a good alternative. The big benefit of TypeScript is that your compiler checks this all for you. I've seen to much incomplete or wrong JSDoc in my life.. also a nightmare to maintain.




You can shove @ts-check on the top of js files and get some decent checks going on. It isn't 100% but it'll be pretty darn good.





Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: