I am trying to do an SPA with Typescript and I would like to use a module constructed within multiple files. Here is the code I did:
salut.ts
module salut {
export class salut1 {
public Title = "salut1";
}
}
salut2.ts
module salut {
export class salut2 {
public Title = "salut 2";
}
}
MyApp.ts
/// <reference path="salut.ts" />
/// <reference path="salut2.ts" />
class MyApp {
constructor() {
var salut1 = new salut.salut1();
var salut2 = new salut.salut2();
}
}
window.onload = () => {
var app = new MyApp();
};
Visual Studio Intellisense informs me that there is no error in the code, meanwhile, when I start the application, I have the following error in the console:
Uncaught ReferenceError: salut is not defined.
Thank you for any help.