You will learn about the following topics:

  • Function declarations vs. function expressions
  • Function types
  • Union types
  • Type guards
  • Function overloading
  • Specialized overloading signature
  • Type aliases
  • String literal types
  • Tuple types
  • Function with optional and default parameters
  • Functions with rest parameters and the spread operator
  • Functions and scope

2.1 Introduction

After learning how to configure your development environment and how to automate some of the tasks in your development workflow with Gulp, we will continue our journey towards our goal: becoming a full-stack TypeScript engineer. In this chapter, we will learn some effective usages of some of the core building blocks of the TypeScript programming language: functions and classes.

Shiv Kushwaha