In this section, we’ll continue from the previous section and delve further. We’ll basically see how to create and observable and also how to use observable effectively without a class rather based on a function.
In this section, we will get started with RXJS. So, if I start with official definition of RxJs, it says “An API for asynchronous programming with observable streams“. Here is the official site for this http://reactivex.io/. RXJS is just one part of its implementation. You can check its entire supported language at http://reactivex.io/languages.html. It supports wide variety of languages.
In this section, we are going to talk about Modules. Modules, keep the code separated. In many ways, it help users to keep the code neat and clean. It’s something like we are going to keep different unit of works in different placeholders or you say in different files. By separating the code out, it enhances the productivity immensely, like test-ability and re-usability enhances immensely. This way, your code not only appears robust, but it also follows good pattern like code-of-separation and solid. Now, we explicitly declare module with the name module itself. From C# perspective, you can also think modules as equivalent to namespaces.
In this section, we will see how to use third party libraries like jquery or angular or anything with TypeScript. TypeScript, provides this flexibility to use any third party libraries on the top of your TS file, using some interface. And, this interface is called Definitely Typed in TypeScript. Here, is the URL of Definitely Typedhttp://definitelytyped.org/. Once you open the same, it will open the following page.
In this section, we will delve further and see how to work with Interfaces using TypeScript. Below, I have created a very simple and straightforward interface and class. Here, class Implements the interface.