Level 1M10Lesson 10.2

beginner35 minby DevFox

Your first generic function

Write your first generic function: give a function its own slot with <T>, let each call fill it from its arguments, and see why T keeps the type where any loses it. TaskKit gets findBy, a helper that searches any Map by a rule, tested on a Map of tasks and a Map of numbers.

  • Fundamentals
  • TypeScript
Your first generic function. Read this lesson at .