Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Two downsides to TS: an extra step to transpile, and having to write shims when it bugs out and can't verify an external declaration.

Upsides? When tuned to its most pedantic settings I've uncovered a handful of bugs that would have otherwise launched.

That's worth far more than a few tiny annoyances. tslint > jslint.



If you are working on the server side, ts-node has been a huge timesaver. It removes the extra step of compiling and lets you just run your script with `ts-node script.ts` or even `#!/usr/bin/env ts-node` at the top of your file works.

https://github.com/TypeStrong/ts-node


Thanks for the node tip!

I built an electron webpack framework and it uses hot reloads, but since i fork a lot of processes, it doesn't quite understand those need to be reloaded too! Got a fix for that by any chance?


babel-node is also very nice, and more lenient about type checking. i've discovered nodemon with babel node gives me the ability to hack something together and adding a tsc build pipeline helps me correct the types when i'm done


FYI, tslint is deprecated since 2019.

Most people use eslint. But eslint on TS is excruciatingly slow.




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

Search: