Summary
In this chapter, we introduced two key concepts in TypeScript – higher-order functions and callbacks. The chapter first defined HOCs and illustrated this concept with a number of examples. You also orchestrated data filtering and manipulation using higher-order functions. Finally, you also tested your skills by creating a higher-order pipe function.
With regard to callbacks, the chapter first introduced the definition of callbacks with a few generic examples, along with examples relating to callbacks in Node.js. You also saw how you can easily fall into callback hell and how you can avoid it. Although there are several additional steps that you need to take in order to master higher-order functions and callback, this chapter got you started on the journey. The next chapter deals with another important concept in TypeScript – promises.