While working in Visual Studio 2015 Enterprise with Update 2 installed, I decided to create a new TypeScript project called TypeScriptHTMLApp1 using the default template and settings. As part of this project, I added a new TypeScript file named log.ts and inserted example code from this GitHub link.
// -------- log.ts --------
export function message(s: string) {
console.log(s);
}
Following that, I included specific lines of code at the beginning of the app.ts file.
// -------- app.ts --------
import { message } from "./log";
message("hello");
class Greeter {
element: HTMLElement;
Upon attempting to run the project in Internet Explorer (via the Microsoft Visual Studio IDE), an error message appeared:
Unhandled exception at line 2, column 1 in http://localhost:20728/app.js
0x800a1391 - JavaScript runtime error: 'require' is undefined