DEV Community

Discussion on: How to create a type for complex JSON object in TypeScript?

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

I just don't get it. Just use plain JS and stop creating more work for yourself 😉

Collapse
 
ankittanna profile image
Ankit Tanna

You don't realise the potential of typescript.

Good luck resolving console error messages and run time errors 😂

Collapse
 
piotrlewandowski profile image
Piotr Lewandowski • Edited

You kinda replied to yourself: you just don't get it. Taking care of the quality of your work is not "creating more work" - it's making sure you don't have to put work to fix your half-arsed code in the future.

Collapse
 
shuckster profile image
Conan

Come now, both of you. Just because you DO type your code doesn't mean you necessarily increase it's quality, and just because you DON'T type your code doesn't mean you're saving yourself from extra work.

Thread Thread
 
piotrlewandowski profile image
Piotr Lewandowski

I don't type all of my code (as in not in every project I work on), but when I have the opportunity to use TS it definitely helps me to catch errors earlier. So yeah, I'd say it does help to increase quality, especially when you work in a team, TS helps to keep consistency on the codebase. Also refactoring: so much easier with TS!
Disclaimer: I still sometimes swear at TS because I'm still learning it :) Just this week I invented at least 5 new swearwords in at least 2 languages I speak ;)