Why Typescript?

Mark Peñaranda
Mark Penaranda
Published in
2 min readSep 16, 2017

Its been a while since I decided to use Angular over React to write our system. Honestly its tough to decide whether to use the comparatively new version of Angular over the hip and the so called thing of the future ReactJS. Apparently I chose Angular.

The full reason why I chose this way (Angular), I think deserves a different blog post. But I want to focus with one of the major key which is Typescript.

Well before I get started I want to remind you that everything that I will say is only based on my own discretion. I’m not forcing you to switch all your JS code into Typescript. But one thing is very clear I want to share how cool Typescript is.

  1. Static Data Typing

some may argue that the beauty of Javascript is its nature of having a very dynamic variable. well for me in a long run it will be a problem. Imagine maintaining and building a big project with a big team. It would be problem eventually without having that stricter data typing, It would be very hard to determine the proper data types for each variables. You would have to rely on the former developer’s JS documentation. Unlike having a static data type it will require everyone to follow a stricter standard. And at the very least we can limit the mistakes of passing parameters and variables to functions that doesn’t have to deal with that type of property.

2. Compiler

for some of us the reasons why we enjoy interpreted languages is that we can test immediately all our codes. The fact that we can see our changes instantaneously in our browser regardless if its buggy or not. But things will change as your project scale. With the big help of compiler we can trace and validate possible bugs during compile time.

3. Tooltips and IDE helpers

“Real programmers don’t need tooltips”. I totally disagree with this. To be honest tooltips saves a lot of time. Why? It removes the idea of checking the other class for a certain function, removes checking of proper parameters and, etc. If theres a way that can make you code faster without sacrificing the beauty of your code. Then its a big YES for me.

4. It encourage you to write beautiful codes.

because of all the stuff i mentioned earlier I believe in a way that typescript encourage you to write beautiful codes. And that is a big plus for me. Knowing that the tool that i’m using is equipped with features that can help my team to develop a more maintainable codebase gives me confidence. Same reason why I love Ruby on Rails.

Again these are only based on my own experience, and I hope some of my insights helps you decide “Why Typescript?”

--

--

Mark Peñaranda
Mark Penaranda

Senior Software Engineer. I write to collect my thoughts and organize my thinking. A journal to keep my ideas and learning.