Modules

TypeScript also supports modules. As we deal with a large number of external JavaScript libraries, this module will really help us refer and organize our code. Using the import statement, we can import external modules, as illustrated:

Import { inv } from "./Inventory"; 
var p = new inv.Product('mobile', 101);

Here, we just imported the previously created module, Inventory, and created an instance of Product assigned to the p variable.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.130.24