Parse at the boundary, read the failure, and let the schema be the type.
Use Zod 3 schemas for runtime validation, coercion, object/tuple/record composition, and safe parsing in TypeScript or plain scripts.