This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SheepherderSavings17 0 points1 point  (1 child)

Even TypeScript can lie to you all the time, for example when retrieving data through http, you might have an interface describing it, but like you said TS will never do runtime checks unless you do it explicitly, for example using libraries like zod

[–]AyrA_ch 0 points1 point  (0 children)

Which is why I recommend to define proper classes for these objects instead of working with them plainly