I'm using TypeScript internal modules to structure my code into logical blocks. (much like a C# assembly or a Java jar).
When doing so, the TypeScript classes within such an internal module are split across different files (one file per class). However, referencing classes inside this module only works when those classes are exported.
Naturally, I'd like to keep some of those classes internal to my module. For example, suppose I'd like to keep both of these classes internal.
/// Bicycle.ts
module Sample {
class Bicycle {
}
}
/// Mountainbike.ts
/// <reference path="Bicycle.ts" />
module Sample {
class Mountainbike extends Bicyle {
}
}
Using visual studio 2013, this only compiles when putting an export on the Bicycle class. When I put both classes in a single file, everything works fine. Am I missing something here?
Thanks for your time, Koen