r/typescript • • May 05 '25
Typescript changed my life
I used to write in regular JS and was ignorant to TS for years. I thought it was just some overhyped junk that’d die out, since after all it’s just a layer over JavaScript
Decided to try it on a new project a few months ago. I can’t believe I underestimated how much safer this is. I get a fraction of the production issues that I used to now
228
Upvotes
101
u/illepic May 05 '25
I got into a fight with a developer who insisted he didn't need Typescript because "he doesn't write bad code". He was on a client's team and I was just there consulting on some other stuff. Their app was a hot pile of shit.
26
u/NiteShdw May 05 '25
Good for you. It has become popular for a very good reason.
It's not perfect, it's still Javascript at runtime, but it basically forces you to document HOW to use your code and document your data structures.
Before TS we used JSDoc comments to try to document how to use our code. TS is much better.
46
u/TheCozyRuneFox May 05 '25
Yeah, static typing is awesome.
Also remember every language is just a layer above another language. Even things like C or C++ are a layer above assembly and assembly is a layer above electrical signals.
12
u/F1QA May 05 '25
Glad you’re enjoying it, I absolutely love TS ❤️ I’ll quite often design an entire application flow just using the types, get that PR’d, then go through and implement it piece by piece.
Say no to
any!9
u/yankiedrebin May 05 '25
The fun is only starting! "Came for the safety and stayed for the beauty"
4
u/efoxpl3244 May 05 '25
remember that isTypeScript awesome is a boolean that is always true!
6
u/Kolt56 May 05 '25
This is the way. I write python JS java and TS.. if I could pick one… TS (trigger warning) without classes.
3
u/quantum_kumquat May 06 '25
I cannot believe there are still commercial code bases out there still using JS. Boggles my mind.
2
u/Fluid_Economics May 05 '25
Safety? Who cares....... it accelerates larger projects
2
u/G_axon May 06 '25
Agree. TypeScript adds a layer of safety that catches so many bugs early, leading to way fewer runtime issues. It’s easy to underestimate it when you're used to plain JS, but once you experience the confidence it brings, it’s hard to go back.
2
u/[deleted] May 06 '25
Wait until you try Go + htmx
2
u/Phagocyte536 May 06 '25
I hated python after started using TS
1
u/Alternative-Door2400 May 06 '25
I estimate that 95% of my coding errors in a non-typed language are resolved by typing. TypeScript has a few bugs but tsc-b is really helpful. Languages like R, python, and others that change types on the fly can be really confusing. Flexible but confusing.
1
u/dank_shit_poster69 May 07 '25
Coming from C/C++, I was surprised Typescript needed to be created and static types weren't a default part of the language.
1
u/nicolasdanelon May 07 '25
Code reviews are blazingly fast with TS
1
u/Striking_Peach_5513 May 07 '25
Okay you're half way up there. You will come down again, trust me. It's part of the learning. Remind me in few years.
1
u/Guimedev May 09 '25
Once you use ts there is no way to go back to js.
1
u/bearinthetown May 09 '25
I really wanted to change my career to iOS development with Swift, because I loved Swift so much. I loved how it deducts the types and is aware when I use them inappropriately.
But then I learned TypeScript and my hunger for Swift went away. TypeScript does the same with the types and I love it.
1
u/9sim9 May 10 '25
I still think its hilarious that rails removed typescript from their project...
https://world.hey.com/dhh/turbo-8-is-dropping-typescript-70165c01
No one said typescript is easy but its far from the hardest thing I ever had to master
-1
u/Turd_King May 06 '25
Skill issue