DEV Community

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

jonrandy profile image
Jon Randy • Edited on

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

piotrlewandowski profile image
Piotr Lewandowski • Edited on

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.

shuckster profile image

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 ;)

ankittanna profile image
Ankit Tanna Author

You don't realise the potential of typescript.

Good luck resolving console error messages and run time errors 😂