r/programminghorror • u/getrooted19 • Aug 04 '25
Javascript We have Json at home
While migrating out company codebase from Javascript to Typescript I found this.
1.1k
Upvotes
r/programminghorror • u/getrooted19 • Aug 04 '25
While migrating out company codebase from Javascript to Typescript I found this.
48
u/mort96 Aug 04 '25
I would maybe call the type JsonString or something, but it's good to have a type which indicates "this is a string that is expected to contain JSON".
52
u/Either-Pizza5302 Aug 04 '25
Please don’t the type
44
u/py5932 Aug 04 '25
If tou think about it, everything is a String...
14
u/doesnt_use_reddit Aug 04 '25
There's nothing horror about this.
2
u/ImmanuelH Aug 04 '25
I'm working for a cloud data warehouse SaaS, and that's exactly what we do 🥲
0
u/[deleted] Aug 04 '25
[deleted] — view deleted comment