Typescript
At the company, I work at we are currently on our way to build something new. As I was the guy in the past to chisel out something, I was the choice again.
Since we are changing the technology a “little bit”: from EmberJS to Vue. We knew that we needed to create a new Boilerplate for your “products”.
So last week and this today I checked out Typescript. I put my nose into it a bunch of times before, but never really got started with it.
I know, I know, wait, aren’t you writing Javascript because you want to write typeless code? Yes, that’s kinda true.
Javascript only has a small base set of types and more importantly no strict checking of these. There is nothing to prevent you from adding “XYZ” to the number 3.
So, yes, on one side you don’t need to think about types, but on the other, the larger and larger your applications get and the more business logic you need to implement, the easier it is to make mistakes. One represented as a number (1) isn’t the same as one represented as a string (“1”).
Typescript helps you prevents such kind of “parsing” and sloppiness mistakes.
I tried some things today and I have to admit it is pretty easy to get into writing “the new” typescript code, but I also saw a problem arise. We can’t easily use our existing node modules as we expected to do.
I will be doing some more evaluating stuff tomorrow, but a decision has to be made. (Is it worth the effort to write some of our “core” libraries again?)