Skip to content
skillbld
Day 3 of 14 30 minParametersReturn typesFunction types

Type your functions' inputs and outputs. Annotate parameters and return values, use optional, default and rest parameters, describe callbacks with function types, and overload a function when one signature isn't enough.

By the end of today you can

  • Annotate function parameters and return types
  • Use optional, default and rest parameters with the right types
  • Write function types for callbacks and variables that hold functions
  • Understand void and never as return types
  • Write overloads for functions with several call shapes

What's inside

  • 5 sections
  • 2 diagrams and mind maps
  • 7 code examples you can run
  • 5-question quiz
  1. 1Parameters and return types
  2. 2Optional, default and rest parameters
  3. 3Function types and callbacks
  4. 4void and never
  5. 5Overloads

Sign in free to read this lesson

Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.

Sign in free
Day 3: Functions · TypeScript · SkillBld