A strong TypeScript answer explains which invalid states are removed, which runtime risks remain, and how another engineer will understand the resulting API.
Core model questions
- How are `unknown`, `any`, and `never` different in an API?
- When is a discriminated union better than optional fields?
- How does control-flow narrowing work?
- What does structural typing make easier or riskier?
- How do generic constraints improve an API?
Practical API questions
- Design the states of an asynchronous request.
- Type an event map without losing event-specific payloads.
- Model a form with conditional fields.
- Create a type-safe adapter around untrusted JSON.
- Evolve a shared function without breaking callers.
System questions
- Where should runtime validation occur?
- How should generated API types be consumed?
- What is your strategy for strictness in a migration?
- When can type assertions hide a design problem?
- How do project references or package boundaries affect a large codebase?
Answer framework
- State the product invariant.
- Show the simplest readable type model.
- Name the runtime boundary.
- Discuss inference and call-site ergonomics.
- Explain migration and testing consequences.
Turn the guide into a retry
Choose one section, practice it under interview conditions, review the evidence, and repeat the same skill with a new prompt. Improvement becomes reliable when it survives a different context.
Start a mock interview