Hacker News new | ask | show | jobs
by HumanDrivenDev 3078 days ago
Typescirpt suppots mixed .js and .ts projects. You can even typecheck things based on jsdoc doc comments.

https://github.com/Microsoft/TypeScript/wiki/Type-Checking-J...

I really like typescript. I'm not a static typing fanatic like a lot of people are these days, I prefer the optional annotations approach. You can set the slider to be as loose or as strict as you want, which is amazing. One thing I've just discovered is you can write types like this

    type one_to_five = 1 | 2 | 3 | 4 | 5
And it just bloody works.

I wish there was a decent REPL for it though. And no, the node REPL or anything based on it is not decent.