Hacker News new | ask | show | jobs
by no1youknowz 2719 days ago
I went from jQuery (inc libs) and < ES5, to VueJS (components) and ES6.

It was such a big jump, after 8 months of it now. I am so much more productive than I was before. It's just not funny.

If I did the same as you. Going from JS to TS, what kind of experience (from there on in) should I be looking at?

2 comments

IMHO the largest difference is the amount of time you save hunting down stupid issues. e.g. no more spending 3 hours fixing a typo.

Also, code is much more manageable, and refactoring is tons easier.

With enough Babel plugins, you can get ESNext functionality that does whatever you want (some of those early stage proposals are really cool! They might go away tomorrow, but hey, so cool!), so Typescript's old advantage of offering more language features is kinda nullified.

In the end, I started writing the later part of my current project in Typescript, and I much more enjoy working on that part of the code than the earlier parts.

TS takes one day to get going, which is one of the best things about it.

Stick to the 'basics' of TS, which are super general programming syntax structures and idioms - there's really nothing new you'll come across (maybe unions?) - so it's easy.

Then you can try some of the trickier things but frankly we don't use them that much.

You'll be up and running pretty quickly because you can mix your 'new' TS modules with old-school JS code no problem.

And then go from there.

I like TS because it's not some big new fancy paradigm shift: it's just typing, some other pragmatic things, and it works pretty well, very quickly.

It's the only tech I will actively evangelize as being 'the thing you need if you use JS' type thing.