TypeScript 3 Essentials

TypeScript is exploding in popularity, as more and more developers realize how improved error checking and in-editor documentation supercharges their workflow. In this advanced workshop, we'll build up an understanding of how TypeScript looks at your code, and use that as a foundation to discuss what's possible with classes, interfaces, and more.

We'll take a close look at declaration files, which can work hand-in-hand with JavaScript files to provide the missing type information. We'll write some tests for our types, and even walk through the process of making a fix to the community DefinitelyTyped types.

TypeScript isn't just a great programming language, it's an amazing tool for analyzing code in general. We'll take a look at the TypeScript compiler API, and use it to build a simple documentation tool, based on the same information you see in Visual Studio Code tooltips!

TypeScript 3 Essentials

Generics and Advanced Types

TypeScript's type parameters allow types to be defined in terms of other types, similar to how a function's arguments can be used to parameterize its return value. We'll look closely at cases where this kind of abstraction is appropriate, and highlight a few advanced examples to get a glimpse at how capable the TS type system is.

  • Generics and Advanced TypesLunch

    Break for Lunch

  • Generics and Advanced TypesGenerics

    Generics allow types to be defined in terms of other types, similar to how a function's arguments can be used to parameterize its return value. We'll look in depth at type parameters, how to identify appropriate opportunities for use, how to appropriately constrain them and more!

  • Generics and Advanced TypesGuards and Extreme Types

    We'll explore TypeScript's "top" and "bottom" types in detail, and explore how they can be used in conjunction with type guards to "narrow" for based on a condition.

  • Generics and Advanced TypesAdvanced Types

    We'll apply what we've learned so far to write some utility types that are tricker and more involved, making used of mapped types, indexed access types, type queries, conditional types and more!


Develop a Mental Model

Understand how TypeScript looks at your code, and use that knowledge to be maximally descriptive and type-safe, with minimal effort

Editor Integration

Get the most out of a modern VSCode + TypeScript development environment

Advanced Types

Work with advanced concepts like conditional and mapped types, and methodically debug any mistakes you may encounter in ambient type packages