I am making a NodeJs console application with NodeJS Tools for Visual Studio (http://nodejstools.codeplex.com/) with the Typescript template.
Here is basicaly my code :
app.ts :
/// <reference path="Module/Module.ts" />
var foo = new Module.ModuleClass();
foo.foo();
Module/Module.ts :
module Module {
export class ModuleClass {
foo() {
console.log('Hello World');
}
}
}
The compiler run without trouble but on runtime, NodeJS can't find the module. Here is the error :
var foo = new Module.ModuleClass();
^
ReferenceError : Module is not defined
I tired a lot of thing about that problem (using or not the /// but I can't find any solution.
Excuse me for my English, I am not a native speaker. Thanks in advance !