Topics

Jump to a topic.

Search questions

Find a question by title, tag, or summary.

Chapter 04

Type-level programming

Computing types from types: conditional types and infer, mapped types, template literal types, recursive types, and the built-in utility types.
6 questions
  1. 010How do conditional types work, and what is distribution?Coming soonCorehard
  2. 020What does infer do? Implement ReturnType and Awaited.Coming soonCorehard
  3. 030How do mapped types work, including key remapping and + / - modifiers?Coming soonCorehard
  4. 040What are template literal types, and what are they used for?Coming soonmedium
  5. 050Which built-in utility types do you use, and how would you implement them?Coming soonCoremedium
  6. 060How do you write a recursive type such as DeepPartial, and what are the limits?Coming soonhard