logoalt Hacker News

bpiroman04/28/20251 replyview on HN

I really don't understand why typescript exists...


Replies

pfg_04/28/2025

Without typescript, if you make a mistake in a type, it will throw an error at runtime when you try to use it. Then, you have to backtrack to find where it was created to find the bug.

With typescript, there's an error squiggle in your editor under the bug before you even run your app.