Installation and Setup Hi. This is Brice Wilson. Welcome back. In this module, I'm going to cover the very basic things every developer needs to do to get started writing TypeScript code. This includes installing TypeScript, as well as selecting and configuring your development environment. There are lots of editors that provide excellent support for TypeScript, and I'll show you how to configure, as well as write and compile TypeScript code in several of them. I'll start things off with a quick demo showing you how to install TypeScript. It's a very straightforward process and only takes a minute once you have Node and npm installed. I'll then go over some of the very good options available for editing TypeScript code, and walk through the process of using several of the most popular editors. I'll show you how to get started with Visual Studio, Sublime Text, WebStorm, and Visual Studio Code. Let's get started by installing TypeScript.
Interfaces Hello. Welcome back. This module will be all about interfaces. Interfaces play an important role in TypeScript by giving us a means to define our own types, types that the TypeScript compiler can then check for us and make sure we're using correctly. I'll begin this module by defining exactly what an interface is, and the reasons why we need them. That will lead us into a brief discussion of duck typing and how it applies to TypeScript. We'll then get to the actual syntax for declaring interfaces, both for general types, as well as function types. Interfaces can also be extended and composed from other interfaces, and we'll see how to do that as well. I'll wrap up this module with a brief look at classes and how you can use them to implement an interface.
Modules and Namespaces Hi, this is Brice Wilson. In this module I'm going to cover modules and namespaces. We all want to write well-organized and reusable code, and these are the two features in TypeScript that help us do that. The definition of modules in TypeScript has evolved over time, so I'm going to start with a brief history lesson about modules so you're at least familiar with some of the older terms that were used to refer to modules and namespaces. I'll then talk about some of the high-level differences in modules and namespaces, and when you might want to use one over the other. After that we'll get into the details and see how to create and use namespaces, and then do the same thing with modules. Let's get started.
Generics Welcome back. This is Brice Wilson. In this module I'm going to cover generics and show you how you can write functions, classes, and interfaces once, but have them operate over lots of different types. I'm going to start this module by defining generics and why they are useful. That will naturally lead to a discussion of type parameters, since they're the construct used to define generics. From there, I'll show you how to use generic functions, as well as generic classes and interfaces. I'll wrap up the module by showing you how to apply constraints to generics so that they only work over a subset of all possible types.