
Engineering · May 10, 2026 · Gynvix · 1 min read
TypeScript at the boundary
Types help inside the program. They do not validate the JSON that just arrived.
Two different jobs
A TypeScript interface describes what the code believes. A parser describes what the wire is allowed to send.
Parse once
Validate at the API boundary and pass a typed value inward. Checking the same object in every component means one of the checks will be skipped.
Errors
A failed parse is a 400 with a field name, not a 500 with a stack trace.