Engrain by ByteRush

TS.03 3 concepts

Functions and generics

Write reusable, well-inferred generic functions.

  1. TS.03.01Typing functionsCoreJuniorBeing written
  2. TS.03.02Generics: the basicsCoreJuniorBeing written
  3. TS.03.03Generic inference in depthMid-levelBeing written

Interview questions in this module

  1. What are generics and why use them?
  2. Type a function getProperty(obj, key) so the return type matches the key.
  3. When would you use function overloads instead of a union parameter?
  4. What does NoInfer do?
  5. Type a generic debounce.