First things first, we need to create a new project that will host our application and configure the compiler settings. Create a new project in Visual Studio, using the TypeScript project template as described in Chapter 2, TypeScript Basics, and call it
DrawingApplication. Then, open up the project properties by right-clicking on the project and selecting Properties.
In the following screenshot, you can see the settings we will use for this application:
As you can see, we will be targeting ECMAScript 3 to ensure a broader scope of platforms that our application will run on. We will not be using an external module system, comments will be removed from the final output, and the rest of the output can be left as the default values. Next, we need to modify
index.html to contain a canvas element. The HTML canvas element is part of the HTML5 standard, which is supported by most modern browsers at this point. Since we aren't using jQuery yet, we will also need to move the...