TypeScript Modules and Namespaces
Understand the difference between modules and namespaces, and learn how to use them to organize and structure your code effectively.
1
Introduction to Modules and Namespaces
Modules and namespaces in TypeScript help organize and structure your code, especially in large projects.
While both achieve similar goals, they are used differently, and this lesson will guide you through their distinctions and usage.

2
What are Modules?
Modules are files or pieces of code that export functionality, such as variables, functions, or classes, to be reused in other parts of an application.
TypeScript uses ES modules for import/export functionality, which are now a standard in JavaScript.
All lessons in this course
- Type Inference and Contextual Typing
- Decorators in TypeScript
- TypeScript Modules and Namespaces