EasyEnv
TypeScript
BeginnerLesson 14 of 1825 min · hands-on

Modules

Part of the TypeScript course

Every TypeScript file is its own module. The moment a file has an import or export, its top-level names stop being globals and become module-scoped. This lesson is about the import/export syntax, the type-only variants that TypeScript adds, and the small but consequential rules for naming.

The default for a module is to expose each value by name ...

Want to learn TypeScript Modules in a real environment?

Click below, get a fresh Linux box with TypeScript ready to go, and work through Modules hands-on with an AI tutor that knows your code.

Start this lessonModules

What you'll learn

  • ES module syntax
  • Named exports
  • Default export
  • Type-only imports
  • Re-exports
  • Module resolution basics

Read this lesson in your language

All lessons in this course

18 lessons
  1. 1Hello, TypeScript20 min
  2. 2Type Basics25 min
  3. 3Arrays and Tuples25 min
  4. 4Object Types and Interfaces25 min
  5. 5Functions25 min
  6. 6Union and Literal Types25 min
  7. 7Type Narrowing30 min
  8. 8Type Aliases vs Interfaces20 min
  9. 9Optional, Readonly, and Nullable25 min
  10. 10Enums20 min
  11. 11Generics30 min
  12. 12Classes25 min
  13. 13Inheritance and Abstract Classes25 min
  14. 14Modules25 min
  15. 15Utility Types30 min
  16. 16Mapped and Conditional Types30 min
  17. 17Declaration Files and Libraries25 min
  18. 18tsconfig and the Compiler30 min

Explore other courses

Modules - TypeScript (English) | Engineering Courses