Tuesday 22 November 2016

Is typescript worth it?

I've been using node for a while now and I have heard great things about typescript. I think that typescript is really cool in theory and can make for better programming. I recently decided to try making a project in it. As much as I like the syntax I have had huge problems every step of the way with modules and third party libraries. Every library I've used has it's own unique little issues and even when I install the typings I end up often having to cast to any, which defeats the purpose really. It also makes reading documentation more complicated. I have spent hours fiddling with tsconfig files to get all of the module paths working correctly. I use the atom plugin to transpile, which is awesome in that it gives you info when you hover over variables. It is just so hard for me to do even the most basic things. It slows me down at every step. I think this might go away but from where I am at right now it just doesn't seem worth it. Lots of great apps are written in pure javascript. I find gulp really easy and I use babel to use es7 syntax. When I tried to transpile typescript with a gulp task I found it really unintuitive. All typescript really gives me are types and errors that are usually false alarms. I am already using es6 classes so my code is pretty neat in my opinion. I got it working but it just feels so cumbersome. What have your experiences been like? Should I stick it out and switch to typescript? Any tips on using typescript with node? Any tips on using typescript with express (I have had trouble with middleware that required me to cast to any)?

Submitted November 23, 2016 at 05:33AM by celeritas365

No comments:

Post a Comment