CheatsheetKit

Language Pack · Mid to Senior

TypeScript Developer Pack

The type system, generics, utility types, inference and TS-in-production questions.

TypeScript depth: advanced types, inference, generics, and the design questions around TS at scale.

Questions
360
Topics
20
Pages
247

Get the TypeScript Developer Pack — $9 One-off. Delivered as a PDF by email the moment payment clears.

Prices shown are a USD base. Your local-market price is calculated at checkout in your own currency, plus any local sales tax.

What is inside

20 chapters, in the order the interviews tend to ask them:

  1. Structural typing and assignability
  2. Narrowing and control flow analysis
  3. Generics and type inference
  4. Conditional types and infer
  5. Mapped types and key remapping
  6. Template literal types
  7. Discriminated unions and exhaustiveness
  8. The satisfies operator
  9. Strictness flags and what each buys
  10. Declaration files and ambient types
  11. Module resolution and import types
  12. Generics in library design
  13. Type level performance
  14. Error message quality
  15. Migrating JavaScript to TypeScript incrementally
  16. Utility types and type composition
  17. Readonly, const assertions and literal types
  18. Function types, callbacks and overloads
  19. Classes, privacy and polymorphic this
  20. Type testing and tooling

How the answers are built

Each chapter opens with the checklist the question is really testing. A few from this pack:

Questions this pack covers

  1. In TypeScript, what does it actually mean for two types to be structurally compatible?
  2. Why does a type alias for an object type get an implicit index signature while an interface does not?
  3. After a typeof check, how does the compiler know a value is a string rather than a number or a boolean?
  4. Why does a call to another function appear to reset a narrowed type, and what actually resets it?
  5. How many type parameters should a public function accept, and why does the answer differ from a private one?
  6. Which positions does the compiler infer a type argument from, and in what order?
  7. What does a conditional type look like in a type alias, and what do its two branches mean?
  8. Why does a conditional type over a naked type parameter distribute across a union?

Each one is answered in full in the pack, with the reasoning written out rather than a bullet list.

Related packs

About this pack

How many questions?
360, spread across 20 topics, written out in full across 247 pages.
Do the answers just list keywords?
No. Each answer is written as prose, because that is what you have to reproduce when someone asks you the question.
How do I get it?
Pay once and the PDF arrives by email immediately, with a signed download link.
Can I get it refunded?
Yes, if it is not what you expected. See the refund policy.