Hacker News new | ask | show | jobs
by davidashe 1224 days ago
Author refers to typescript code as “javascript,” considering the distinction no linger meaningful.

Perhaps a sign that it’s finally over, and typescript has won in the community.

2 comments

I think the author might just have a problem labeling things properly. Not only the JavaScript/TypeScript confusion, but the code snippet is also 21 lines, not 10 lines.

But actually:

> Ignoring the Typescript type definitions, its only 10 lines of Javascript!

So removing the types (JavaScript), it is 10 lines, but if you wanna write it in TypeScript it's 21 lines. Proof how verbose TypeScript can make codebases/examples?

I mean, in this case there's not really a difference with regards to the actual substance of the code.

I do see your point though. Typescript has taken off in the last few years.