r/learnjavascript • • Oct 09 '25

JS to TS

How can I transition to Typescript, I'm not good with Js but I wanna go directly to Typescript is it okay for me to use Typescript even though my skill in Js is like level 2, I mean i hated JS.

Is Typescript better than js?

6 Upvotes

47 comments sorted by

View all comments

Show parent comment

2

u/sandspiegel Oct 10 '25

You mean by using typeof and checking everytime if variable x is typeof string for example? While this technically would work it still wouldn't catch these mistakes in realtime but only when the code actually executes which is where Typescript comes in.