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

I want to start using TS for my Node service but ts-node seems janky and the compability with ndb (which I use all the time) seems bad.


(I wrote the article.)

We don't use ts-node for our dev processes because it adds some annoying startup delay. We keep the TS compiler running at all times on our dev machines, and we run our server/tests/etc. from the TS compiler's build output directory. This hasn't been a big pain point for us so I wouldn't worry about it much.

Related, just in case: I definitely wouldn't use ts-node in production. If your deployed code fails to typecheck for some reason, you don't want to learn that by seeing your backend server failing to boot in production. I think you should always compile your app during your deploy process, then have production boot the compiled JS as if TS weren't involved at all.


Anything specific about ts-node that doesn't work or that stuck out as janky?


I keep reading people saying you should use tsc + regular Node instead which is enough to make me worried but haven't really evaluated it myself.




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

Search: