Steve Ognibene is an application developer in New York City specializing in SQL Server, C#, VB.NET and TypeScript. Steve is an active contributor to open source projects and is the author of the “T-SQL Flex” add-in for SQL Server Management Studio.
The First Conversion Welcome to module two in Practical TypeScript Migration. This is where we'll convert our first block of code to TypeScript. Before we dive into migration work though, I want to show you the Coin Counter sample application and talk to you about its makeup. Let's get started. I loaded up the module 2 before code in Visual Studio 2013. Throughout this course when I want to launch the project, I'll use the Ctrl+F5 key combination to launch the website in IIS Express without attaching the Visual Studio debugger. This will allow me to debug using the browser's F12 tools if I want to. Coin Counter is a simple game designed to help children learn to count change. The code that I provided includes artwork and monetary values for US coins, but the game could very easily be adapted to any local currency. I'll type my name and press Enter. The game clock starts ticking down and I've been asked to make a certain amount of change. I'll try to do that. Sixty-six cents, quarter, quarter, dime, nickel, penny. Correct! As you can see there's code to handle button clicks, draw pictures of the coins, display success or failure dialogs, and track your scores versus a high score list. I'll click that. I'm not on here yet, Alice, Bob, and Charlie. We'll go to Game and click Resume. It'll count down for the final four seconds. Great, that's #3. I'll hit Close, High Scores, sure enough, I'm down there. I have to say though that my favorite feature of this game is the unit tests. I'll go ahead and do that. This will launch QUnit, which will go through and run the 26 assertions that we set up. Let's talk about how this game is put together.