Module

This lesson introduces the concept of a module.

How is a module different from a namespace?

TypeScript uses the same concept of the module as specified by ECMAScript 2015. A module is different from a namespace in many ways. The first difference is that modules do not use global scope, but rather, their own scope. A module can be created using the keyword export and it can load another module by importing using the keyword import.

Get hands-on with 1200+ tech skills courses.