I'm using VS2015 and I've created a TypeScript HTML application. I also made the simplest possible external module, like this.
export class MyClass {
public Test(): string {
return "Erik";
};
constructor() {
};
};
Then in my app.ts file i wrote the following.
import E = require('./Erik');
window.onload = () => {
let c: E.MyClass = new E.MyClass();
alert(c.Test());
};
Using F12 dubugging in Chrome I can see this error.
Uncaught ReferenceError: define is not defined
What am I missing? I have made sure that AMD moduletype is selected in the project settings and a Erik.js file is created when compiling.