Over the next two chapters, we are going to learn about some concepts that are closely related to the TypeScript runtime. TypeScript is only used at design time; the TypeScript code is then compiled into JavaScript and finally executed at runtime. The JavaScript runtime oversees the execution of the JavaScript code. It is essential to understand that we will never execute TypeScript code and we will always execute JavaScript code; for this reason, when we refer to the TypeScript runtime, we will, in fact, be talking about the JavaScript runtime.
Understanding the runtime is crucial because it will help us to understand the implementation of a number of functional programming techniques that we will explore later in this book.
In this chapter, we will cover the following topics:
- The environment
- The event loop
- The this...