Course Overview: Practical Advanced TypeScript Features

    Rares MateiRares Matei

    In this course we will look at advanced features of TypeScript and how they can be leveraged in our apps using applicable patterns and examples. In the videos that follow, you will learn how to write cleaner and more readable code that is more type safe, and you will gain access to a lot more options for creating strong & maintainable designs when building classes and services.



    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson


    Instructor: 00:00 Hi, I'm Rareș. The goal of this course is to show you how you can take advantage of some of the most powerful features in TypeScript using practical and applicable examples. By the end, you'll be armed not only with knowledge on advanced TypeScript mechanics, but you'll also know when and how to apply it.

    00:16 I'm excited to show you how much power TypeScript truly has, and how, by knowing about some of its hidden features, understanding in depth how they work in principle, then seeing the patterns in which you can apply them, you will notice yourself having a much easier time coming up with great designs that are both readable and maintainable without compromising on type safety. I do speak from personal experience.

    00:39 We'll be exploring some of the newer features that came out recently that you can enable and start using straightaway for improved type safety and readability, like the number separators, strict property initialization and classes, and the unknown type.

    00:53 We'll also be looking at how to leverage TypeScript's incredibly powerful inference engine. You can write less types, but actually increase type safety.

    01:01 We'll also be going over the age-old question of types versus interfaces in depth, how to leverage the power of recursivity to build infinitely deep data structures, and then we'll build some custom type-safe iterators to traverse over those data structures.

    01:16 Towards the end, we'll look at conditional types, a really innovative new feature, where you can start using conditional if-else logic inside your types.

    01:24 While this feature is amazing for library authors, I'll show you how you can take advantage of it in your client apps, including how to build a type that flattens any other type you pass into it and even one that recursively traverses your Redux state, regardless of how deeply nested it is, and marks every property as read-only.

    01:43 I'll go over how to use the new infer keyword to extract information from complex types using pattern matching. We'll even see how to build chainable property decorators that you can use to initialize or augment your class properties.

    01:58 I'm curious to see what you're going to build after watching this course, and what use cases and designs you'll come up with. TypeScript is an amazing language. I'm grateful to get the chance to show you so many of its features.

    02:09 Let's start. I'll see you in the next video.