In TypeScript, just as in ECMAScript 2015, any file containing a top-level import or export is considered a module.

Conversely, a file without any top-level import or export declarations is treated as a script whose contents are available in the global scope (and therefore to modules as well).

Modules are executed within their own scope, not in the global scope. This means that variables, functions, classes, etc. declared in a module are not visible outside the module unless they are explicitly exported using one of the export forms. Conversely, to consume a variable, function, class, interface, etc. exported from a different module, it has to be imported using one of the import forms.

Export All as x

export * as utilities from "./utilities";
import { utilities } from "./index";

export = And import = require

When exporting a module using export =, TypeScript-specific import module = require("module") must be used to import the module.

import Brackets

javascript - When should I use curly braces for ES6 import? - Stack Overflow

Import Image

javascript - TS2307: Cannot find module ‘./images/logo.png’ - Stack Overflow

declare module '*.png' {
  const value: any
  export = value

import alias

// tsconfig.json
  "compilerOptions": {
    "baseUrl": "src",
    "paths": {
      "@interfaces": ["interfaces/*"]
import { IColumnVisibility } from "@interfaces/IColumnVisibility";
import { ILicense } from "@interfaces/ILicense";
import { ISoftware } from "@interfaces/ISoftware";
import { ISyntax } from "@interfaces/ISyntax";
import { ITag } from "@interfaces/ITag";
import { Language } from "@interfaces/Language";