Asynchronous programming is an important concept, if not the most important concept that you need to understand well in order to create high performing and scalable real-world applications. We will cover a wide array of topics in this chapter, but even before describing those topics, let's cover some fundamentals.
As you all know, the JS that TypeScript gets transpiled to, is a single-threaded language, meaning there is one and only one thread of execution at any point in time. All the operations needed to be performed by your application get executed in the context of this thread. This brings into the picture a very interesting question.
Real-world applications more often than not contain multiple external dependencies, external means that your code relies on another service or entity to do a piece of work. These dependencies could be on the local filesystem, or most likely on other platform services that expose their functionalities in...