What is the pattern for one class per file where multiple classes (and therefore multiple files) contribute to the same namespace? I'm asking this specifically in a Node.js context.
I know how to define one class per file in the same namespace:
foo/A.ts:
module foo {
export class A {
}
}
foo/B.ts:
module foo {
export class B {
}
}
main.ts:
/// <reference path="./foo/A.ts"/>
/// <reference path="./foo/B.ts"/>
// TODO: How do I import the foo namespace at runtime?
TypeScript is supposedly a language for application-scale JavaScript development, yet we seem to be left out in the cold on the most fundamental aspect of application-scale development, which is how to layout and structure code files and how everything is linked together at runtime.