|
|
|
|
|
by ncallaway
1085 days ago
|
|
If you’re taking in data from
an external source that needs to be validated, I highly recommend a schema library like zod, that can produce a typescript type. That way you can define the type in a single place, have runtime validation for that type, but also be able to use the type in typescript at compile time. |
|