In Chapter 1, Functional Programming Fundamentals
, we learned about some of the most fundamental functional programming concepts. Functions are one of the fundamental building blocks of any TypeScript application, and they are powerful enough to warrant an entire chapter being dedicated to them in order to explore their potential.
In this chapter, we are going to master the usage of functions. The chapter starts with a quick recap of a number of basic concepts and then moves on to some less commonly known function features and use cases:
- Function types:
- Function declarations and function expressions
- Named and anonymous functions
- Working with parameters:
- Functions with optional parameters
- Functions with default parameters
- Functions with rest parameters
- Function overloading
- Specialized overloading signature
- Function scope
- Immediately-invoked functions ...