Knowing the nuances around TS

Shifting from JS to TS especially for devs may feel a bit “funny”/ “weird”…This applies if you fall in any one of the following criterias:

  • Your 1st programming language was JS

  • You learned the entire MERN stack using JS

  • YOu have no idea what classes are and you have skipped the part of JS with Classes and Constructors

  • You decided to learn front end dev and JS came along with the starter package of HTML,CSS

I personally have experienced msot of the above points…but lucky for me JS was not my 1st programming language and i did develop some backend applications using Spring/Spring boot with Java and a lot of basic OOP JAVA programming before…still the shift felt weird..It’s like writing JS..but with your left hand and right hand tied around your back…

Here are some useful tips/tricks personally worked for me to make my shift smoother:

PS: By any means if you think of going Rambo mode by accepting TS directly without knowing the nitty gritties of JS..well that is a suicide mission and is definitely not recommended if you ask me..

  1. Embrace the new concepts: Learn about OOP, classes, interfaces adn types..Yes there is no shortcut

  2. Practice writing a lot of code until that feling of writing JS with your left hand feeling becomes natural

  3. Absorb step1 by applying Step 2

  4. For loop step 3 until your day index===”Feeling normal”

One done, i think writing TS code in React/Node apps should be fair easier and a cake walk..In today’s world i see TS is a must…98%of applications if hosted using a form of node package would be written in TS…and there is simply not a way out of this unless you decide to shift to Java ecosystem/AI ecosystem using python…but for the web..if there is JS…there is it’s alter ego TS…

Happy debugging folks!

0
Subscribe to my newsletter

Read articles from Pratikshit Chowdhury directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pratikshit Chowdhury
Pratikshit Chowdhury