3 ms·
I haven't written anything in TypeScript, though I have some friends that love the language; I got annoyed at having to supply bindings for obscure languages.
by tombert 8y ago
I haven't written anything in TypeScript, though I have some friends that love the language; I got annoyed at having to supply bindings for obscure languages.
If you can get past the initial hurdle, is TypeScript worth it for Node.JS stuff?
- gmac 8y agoYES. I would never go back. Types, combined with a great IDE in VS Code, make for a so much less frustrating experience.
- dpacmittal 8y agoTypescript is a godsend. Once you get comfortable with TS, you just can't go back to normal JS.
- pas 8y agowhat does bindings for obscure languages mean in this context? does TS count as obscure?
- klodolph 8y agoTypeScript doesn't require bindings to call JavaScript libraries. This includes writing code to run in the browser and writing Node.js code. Instead, what you want are type definitions for the library you use. These are optional, but make using a library with TypeScript a much better experience. It is very common for these definitions be available already, whether the library is written in TypeScript or something else. Years ago I remember having to manage these type definitions, these days I don't really have to think about it much. There's not much of an initial hurdle, to be honest. You're mostly adding annotations to your JavaScript code. It does influence the structure of your code but not as much as you might think, at least in my experience.
- stevefan1999 8y agoJust like @klodolph said, TypeScript to JavaScript is what C++ is to C, I.e it offers SUBSTANTIAL benefits while there are still some dark sides of the language to be discovered. (My personal view: TS metaprogramming is the hardest for me so far, enum mess, Babel TS preset lacking metadata support etc)