In Visual Studio 2015 Enterprise (Update 2 installed) I've created a new TypeScript-Project TypeScriptHTMLApp1 from the Template (using default project settings). After that, I created the new TypeScript file log.ts and copied the example code from https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#11.3 to that newly created file.
// -------- log.ts --------
export function message(s: string) {
console.log(s);
}
Next, I copied the following lines of code to the beginning of the app.ts files.
// -------- app.ts --------
import { message } from "./log";
message("hello");
class Greeter {
element: HTMLElement;
When I try to run this project in Internet Explorer (from inside the Microsoft visual Studio IDE), I receive the following error message:
Unhandled exception at line2, column 1 in http://localhost:20728/app.js
0x800a1391 - JavaScript runtime error: 'require' is undefined