Namespaces, also known as internal modules, are used to encapsulate features and objects that share a certain relationship. Namespaces will help you to organize your code. To declare a namespace in TypeScript, you will use the namespace and export keywords:
namespace geometry { interface VectorInterface { /* ... */ } export interface Vector2DInterface { /* ... */ } export interface Vector3DInterface { /* ... */ } export class Vector2D implements VectorInterface, Vector2dInterface { /* ... */ } export class Vector3D implements VectorInterface, Vector3DInterface { /* ... */ } } let vector2DInstance: geometry.Vector2DInterface ...