# Advanced Types

- Prefer constrained generics over broad unions for reusable APIs.
- Use conditional types for input/output mapping by shape.
- Use mapped types and template literal types to derive key-safe APIs.
- Keep complex types readable with helper aliases and comments.
