Description
Course info
Rating
(126)
Level
Intermediate
Updated
Apr 17, 2015
Duration
2h 21m
Description

In Practical TypeScript Migration, Steve Ognibene converts a web application that uses popular libraries like jQuery and Knockout to TypeScript. The example app is entirely HTML, CSS, and JavaScript, so this course is equally applicable to users of any server-side framework. Steve recommends migration techniques that work well, and highlights some things to avoid. He also makes sure to cover related subjects like source control and preparing your team. Once the application is converted over, Steve demonstrates the code refactoring capabilities that TypeScript enables, and then assembles a TypeScript build script using Grunt and other Node.js tools. After watching this course, you will be well prepared to migrate your existing JavaScript code to TypeScript.

About the author
About the author

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.

More from the author
Using ES6 with TypeScript
Intermediate
2h 15m
25 Feb 2016
Section Introduction Transcripts
Section Introduction Transcripts

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.