One of the most powerful and popular JavaScript libraries that specializes in event processing is the Reactive Extensions for JavaScript library, or simply RxJS. RxJS uses the Gang of Four (GoF) design pattern named the Observable pattern as the basis for registering interest in an event, as well as doing something when an event has been triggered.
This article is an excerpt from my book, Mastering TypeScript, 4th Edition – A comprehensive guide to understanding TypeScript language and its latest features. In this article, you will explore Observables in the RxJS library. You can download the codes in this article here.