I'm struggling with TypeScript modules in other files. Let me explain...
I have a file ModuleOne.ts with:
module Messages {
export var TestAlert: string = "It works!";
}
then in my app.ts, I have:
/// <reference path="Scripts/typings/jquery/jquery.d.ts" />
/// <reference path="ModuleOne.ts" />
declare var $;
$(function () {
alert(Messages.TestAlert);
});
It compiles fine, but in console, I get "Uncaught ReferenceError: Messages is not defined". If I move Messages module from ModuleOne.ts to app.ts, everything works fine. How do I use Messages module from ModuleOne.ts file?