From the course: TypeScript Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Module basics

Module basics

- [Instructor] At this point in the course, I've shown you all of the TypeScript syntax that you'll need to know in order to use TypeScript successfully in your day to day development. In this chapter, I'm going to shift the focus to using the syntax you've already learned, but in a different way. And in fact, I'm going to start by going back to a JavaScript feature, modules. Put simply, JavaScript modules enable you to link code that is distributed across many files. Let me demonstrate. Here is an old school JavaScript web application stored in several files. And in our webpage, we use HTML script tags to download and load each of these files into the browser's memory. As we do, the contents of each file get loaded into the same shared memory space. That means that when I define a function in one file and then define another function in another file with the same name, and then load both of these files like I'm…

Contents