Hacker News new | ask | show | jobs
by jmlee2k 2889 days ago
We've been using Typescript (almost) since the day it was released. IMHO, I would never start any decent-sized JS project without it.

The development speed is really good. It of course takes some time to transpile, but we have a live-reloading setup which allows us to see code changes almost instantly. The actual build time will depend on your setup (our projects are usually between 1-5s), but I think the advantages of a type system easily outweigh any build time.

I don't have too much experience with the different test frameworks, but we've used mocha (with chai), and they both work great.

The only real downside is that non-TS libraries will need a definition file to enable typechecking. We don't use too many 3rd party libraries, but most of the popular ones include typescript definitions, and making your own for libraries which don't have them isn't too hard, depending on the size of the library, of course.

In summary, we've not seen any downsides to using TS. The language is a joy to write in, and the type system is so well designed that you can actually avoid writing code in some places by designing your types properly.

I hope this helps!

1 comments

Thanks a lot. This is helpful. I know that you better not avoid type checking, but just curious, when it comes to 3rd party non-TS libraries, I suspect a definition file is just a beneficial option and you can still live without it, is this correct?
Correct. Most popular libraries have them, though. Even if they aren't TS.

Speeds up development a lot when you have them, though!