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.