Here is a question for the TypeScript experts.

I have been reading about Zod which gives runtime type validation.

Is this a good fit to TypeScript and are we likely to see such functionality added to TypeScript?

I've found libraries like Zod useful when interacting with external data sources like a database. Slonik[1] uses Zod to define the types expected from a SQL query and then performs runtime validation on the data to ensure that the query is yielding the expected type.

I don't think it's necessary to use Zod/runtime validation everywhere, but it's a nice tool to have on hand.

[1]https://github.com/gajus/slonik