Topics

Jump to a topic.

Search questions

Find a question by title, tag, or summary.

Chapter 03

Generics

Parameterised types and functions: constraints, defaults, inference of type arguments, variance, and the keyof / typeof / indexed-access operators.
5 questions
  1. 010What are generics, and how do extends constraints work?Coming soonCoremedium
  2. 020How are generic type arguments inferred, and when does inference go wrong?Coming soonhard
  3. 030What are covariance and contravariance, and what do in and out do?Coming soonhard
  4. 040What do keyof, typeof, and indexed access types do?Coming soonCoremedium
  5. 050What are const type parameters and NoInfer?Coming soonhard