You have export in front of your class declarations:
export class AClass {
This turns the source file into an external module. This means that you will need to use import / require from another module:
import a = require("a"); module Common { export class A extends a.AClass {} }
Note that AClass appears to be a member, because this is what I imported its containing module as.
Alternatively, you can rename module a after it contains one class, for example
AClass.ts
class AClass { public constructor () { console.log('AClass'); } } export = AClass;
Under the "assignment" of export we make this class the only output of the module. Therefore, in another module:
import AClass = require("AClass"); var a = new AClass();
This may be more accurate if your module exports only one class (or function).
source share