O'Reilly logo

Mastering TypeScript by Nathan Rozentals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using AMD

AMD stands for Asynchronous Module Definition, and as the name suggests, loads modules asynchronously. This means that when an HTML page is loaded, requests to fetch the JavaScript module files happen at the same time. This allows our page to load faster, as we are requesting smaller amounts of JavaScript simultaneously.

AMD module loading is typically used in browser applications, and works together with third-party libraries that provide a script-loading capability. One of the most popular script and module loaders currently available is Require. In this section, we will look at how to use the AMD module-loading syntax, and how to implement Require in a browser-based application.

To begin with, let's create a simple TypeScript-based ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required