Advanced TypeScript

TypeScript is a modern language with many advanced features. This course will teach you those features that build on the fundamentals you already know and allow you to harness its full power to write better code with fewer errors.
Course info
Rating
(169)
Level
Advanced
Updated
Nov 15, 2016
Duration
2h 55m
Table of contents
Course Overview
Maximizing TypeScript
Going Further with Basic Types
Using Advanced Type Features
Creating and Using Decorators
Implementing Asynchronous Patterns
Writing Cleaner Code with TSLint
Description
Course info
Rating
(169)
Level
Advanced
Updated
Nov 15, 2016
Duration
2h 55m
Description

In order to take full advantage of TypeScript you must have the knowledge to use its advanced features to write clean and expressive code. In this course, Advanced TypeScript, you will learn how to harness the full power of the type system to write better code with fewer errors. You will learn how to extend your use of existing types with union, intersection, and tuple types. You'll then go over how to create and use decorators. You will also learn how to manage asynchronous code using promises and the async and await keywords. When you're finished with this course, you will have the advanced skills necessary to fully utilize the language to solve all of your client and server-side coding problems.

About the author
About the author

Brice has been a professional developer for over 20 years and loves to experiment with new tools and technologies. Web development and native iOS apps currently occupy most of his time.

More from the author
State of .NET: Executive Briefing
Beginner
25m
May 17, 2019
RxJS: The Big Picture
Beginner
1h 2m
Mar 5, 2019
More courses by Brice Wilson
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
Hey everybody, my name is Brice Wilson and welcome to my course, Advanced TypeScript. I'm a server and client-side web developer. I love TypeScript and taking advantage of everything it has to offer. In this course, we're going to explore some of the more advanced features of the language that will help you solve difficult problems with new techniques and generally take your TypeScript code from good to great. Some of the major topics we'll cover include intersection and union types, type guards, decorators, asynchronous patterns, and linting. By the end of the course, you'll know how to use the language's most powerful features to solve difficult problems using clean and compact techniques you might not have even thought possible with TypeScript. Before beginning this course, you should be familiar with the basics of JavaScript and TypeScript but you certainly don't need to be an expert at either of them. I hope you join me on this journey to learn lots of powerful TypeScript techniques with the Advanced TypeScript course at Pluralsight.

Maximizing TypeScript
Hi, this is Brice Wilson with Pluralsight. Welcome to Advanced TypeScript. In this course, I'm going to help you take your TypeScript skills to the next level. Maybe you've experimented with some basic features of the language and want to explore some of its other capabilities, or maybe you've been using it for a while and find that you now have a need for some of its more advanced features on your project. In either case, I think this course has just what you're looking for; and we'll cover lots of powerful features you won't normally see in an introduction to the language. This course is really a follow-up to my earlier course titled TypeScript In-depth. That course was for complete beginners with no TypeScript experience. In it I covered all of the basics needed to get up and running with TypeScript and presented lots of beginner and intermediate language features like functions, classes, interfaces, modules, generics, and lots more. That course is certainly not a requirement for this course, but if you're new to the language; or just need a refresher on some of those topics, then that would be a great place to start. I also used the same simple demo project in both courses, so I hope that makes moving between that course and this one a little more seamless.

Going Further with Basic Types
Hello and welcome back. I'm Brice Wilson. In this module, I'm going to show you how to do more with the basic typescript types you are already familiar with. I will cover a couple of nice ES 2015 features typescript supports and then show you several ways to take the types you already know how to create and combine them in new ways to create entirely new types that ultimately allow you to write more flexible code. I will begin by showing you how to perform destructuring assignments and how to use the spread operator. These are both new ES 2015 syntax features that the typescript has adopted. After that, I will show you how to create and use tuple types, union types, and intersection types. They may sound like completely new things but they are really just different ways to combine existing types to make your code more flexible and expressive. After explaining intersection types, I'll show you how to create mixins which allow you to combine all of the members from multiple classes into a single class. I'll then show you how to create string literal types and how to define type aliases that can make your code more readable as you begin to use some of the other features like union types and intersection types. I'll start things off in the next clip by showing you how to perform destructuring assignments.

Using Advanced Type Features
Hi, this is Brice Wilson. In this module, I'm going to cover some much more advanced features available when working with types. They'll help you write cleaner code with fewer errors. You'll also learn about some new capabilities you may not have even known existed in JavaScript and TypeScript. I'll begin by covering a feature known as polymorphic this types and show you how the special this keyword can have a different type depending on the context in which it's used. Next, I'll show you how to implement declaration merging which is a technique for combining multiple declarations with the same name into a single declaration. After that, I'll show you how to use type guards. There are several ways to use them, but they all make your code easier to write and help the compiler find errors before your code is deployed. The last topic I'll cover in this module is symbols. They're a new feature added to ES2015 that is also now supported in TypeScript. I'll explain what they are and show you a few practical applications for them. Let's get started with polymorphic this types.

Creating and Using Decorators
Hi, this is Brice Wilson. In this module, I'm going to cover decorators. They're chunks of functionality you can add to classes, methods and other constructs with a very simple syntax and they play an important role in several large client side frameworks like Angular2. Lots of languages have a similar feature so if you've ever used annotations in Java or attributes in C#, then you'll feel right at home with decorators in TypeScript. I'll start this module off by first answering a couple of questions. What are decorators and how are they implemented? I just gave you a little preview of what they are but I'll give you some more background and go over some use cases as well. I'll also cover the syntax required to both define your own decorators as well as the syntax you'll use when applying them to declarations throughout your code. There are several different types of decorators and I'll touch on all of them and point out some of the slight differences in how they're implemented.

Implementing Asynchronous Patterns
Hi, this is Brice Wilson, welcome back. In this module I'm going to show you how to implement several asynchronous programming patterns in TypeScript that will help you build more responsive applications that ultimately deliver a better experience for your users. I'll apply each of the patterns to the same example in the demos which I hope will highlight the differences in each technique. I'll start this module off by briefly explaining why writing and correctly managing asynchronous code is important. I'll then cover three techniques for writing asynchronous code in TypeScript. The first one we'll look at is callbacks. Support for callback functions has been baked into JavaScript and TypeScript for many years. I'll show you how they work and demonstrate some best practices for defining them. Next we'll look at Promises, they were added to the ES2015 version of JavaScript and are also supported in TypeScript. Finally, I'll show you how to use the async and await keywords to write asynchronous code that builds on top of Promises and is arguably much easier to read and write. Let's start with a look at why writing asynchronous code even matters.

Writing Cleaner Code with TSLint
Hi, this is Brice Wilson. In this final module of the course, I'm going to show you how to use a utility named TSLint to help you write code with fewer errors that also conforms to a set of code styling standards you can configure. I'll start off this module with a brief explanation of TSLint and how you can use it as part of your TypeScript development process. I'll then quickly get into a demo and show you how to install TSLint, run it, and configure the linting rules it uses to alert you to problems. In a second demo, I'll show you how to install and use a really great extension for Visual Studio Code that will alert you to linting issues as you're writing your code.