ES Module

You might know it as the import/export syntax.

There are three main things to consider when writing module-based code in TypeScript:

  • Syntax: What syntax do I want to use to import and export things?
  • Module Resolution: What is the relationship between module names (or paths) and files on disk?
  • Module Output Target: What should my emitted JavaScript module look like?

Danger

Not everything in TypeScript global, especially with ES modules.