Hacker News new | ask | show | jobs
by jackweirdy 1047 days ago
If a property is a string in your typescript interface but a number in your external service (api, DB, whatever) the typescript compiler would not know
1 comments

Or worse if you blindly deserialize JSON and cast it as whatever you want it to be without validation…
e.g. the norm for typescript use.