
Explore how the unknown type sits at the top of TypeScript's type hierarchy, and learn how intersections and unions determine narrowest or widest branches for assignability.
Enforce theme constraints by typing the theme argument as a union of 'light' and 'dark', ensuring the apply theme function accepts only these literals and fails otherwise.
Practice #8 demonstrates defining an accumulator as a callable function with a reset method, using intersection types to attach reset. It shows a number-to-number function signature with reset returning void.
Learn how assert unreachable and exhaustiveness checks use never as the argument and return type to flag unreachable or unhandled API status branches (200, 404, 500) in TypeScript.
Learn how TypeScript enforces excess property checks on inline object literals, aligning them with a type’s minimum properties, while pre-created objects with extras are allowed.
Master TypeScript helper functions that modify and extract object types, including partial, required, pick, and emit, to build flexible, production-grade type definitions.
Extract a subobject type from a blog post data structure using TypeScript's pick helper, keeping the original data untouched while exposing only title and content.
Define a single tuple type for function parameters using variadic tuples with named and optional elements and rest parameters, covering username, optional age, and addresses.
Learn to compute a tuple’s length in TypeScript, handle dynamic tuples, and derive next index with a type helper using spread operator to append an element, producing length plus one.
Learn to create a TypeScript type guard for type narrowing and non-empty arrays. Use a generic [T, ...T[]] tuple with a spread operator to ensure safe, non-empty inputs.
Explore conditional types and branching in TypeScript, using the one-line conditional expression with ? and : to select between types. Understand how type logic mirrors the ternary operator.
Discover how the infer keyword enables type inference in TypeScript by pattern matching against objects, extracting property types, including nested properties, and comparing it to destructuring.
Explore how TypeScript function types work as structured types that expose parameter tuples and return types, capturing them with infer in conditional types.
Learn how to simulate block scoped variables in TypeScript using the infer keyword in conditional types, capturing a heavy computation result to reuse it and avoid recomputation.
Practice solving a TypeScript challenge using a generic t and a conditional type that extends a two-element tuple pattern, via pattern matching, returning true or false.
Practice conditional types and tuple pattern matching to select editable or basic notes by user plan and role in a real-world fetch node.
Explore a practical TypeScript utility that extracts a union of element types from arrays, handling no nesting, a single level of nesting, or deeper nesting by inferring inner element types.
Learn to map over a tuple in TypeScript using a recursive type, extracting each element's role from objects to produce a new tuple of roles.
Apply the reducer method in TypeScript by reducing a tuple to an object, using an accumulator, transformation rule, and recursive splitting of head and tail.
Learn type-level programming by building a generic compose config that reduces a tuple of configuration objects into a single intersection type, using an accumulator and recursive reduce.
Type a tuple of promises in TypeScript using gatherAsync and extractResults to return a promise of a tuple of their resolved values, achieved via recursion.
Explore TypeScript template literal types to generate union string patterns from unions, using examples with size and theme options, and apply distributivity, as const, and exhaustive switch patterns.
Explore a TypeScript utility that recursively extracts placeholders from a command template, splitting on two special characters and building an intersection of objects mapping each placeholder to a string.
Explore how union types represent values that can be several distinct types, and how template literal types, union of keys, and a configuration object shape runtime types.
Discover how union types distribute over operations in TypeScript, applying to template literals and property lookups, and how control flow checks narrow the resulting union into specific branches.
Think of every TypeScript type as a union, unifying generics and type reasoning by treating single types, unions, and the never type as sets of possible values.
Explore narrowing unions in TypeScript using typeof to distinguish string, number, and boolean branches, enabling scope-specific operations like string length, numeric math, and boolean checks.
Filter union types by a type property to display only messages and alerts. Use a generic select-by-type helper that narrows the union to allowed values.
Master filtering and narrowing union types in TypeScript with the in keyword, illustrated by a booking response distinguishing confirmation from error cases.
Learn to use TypeScript's extract and exclude utilities to filter union types, leveraging template literal patterns to keep only members that start with get.
Master The Complete Type System of TypeScript!
The approach of this course sets it apart from other courses. Here, the focus is exclusively on TypeScript, without wasting time on configuring trivial projects. Instead, you'll dive straight into pure TypeScript knowledge.
Rather than enduring lengthy lectures, you'll encounter real-world code challenges accompanied by concise explanations. Armed with these insights and your existing skills, you'll tackle the challenges at your own pace.
The exercises and lessons are carefully designed to reinforce key TypeScript concepts across various contexts, enabling you to understand when, where, and how to apply them effectively in your own projects.
True TypeScript experts possess a deep understanding of the language, which makes it feel straightforward and predictable rather than mysterious. The TypeScript Bible course aims to foster this level of comprehension.
Upon completing the course, you'll achieve mastery, reducing your apprehension when facing complex TypeScript errors, boosting your confidence in typing dynamic signatures, and streamlining your coding process.
By enrolling in this course:
You'll enhance your abilities as a contributor and reviewer.
You'll be the one to remove obstacles and increase productivity for others.
You'll truly grasp the inner workings of TypeScript.
This course isn't just a compilation of TypeScript tricks. Instead, it's focused on helping you develop a strong understanding of the language's fundamentals. I believe that building a solid mental model of these basics is more empowering because it equips you to tackle a wider range of problems, even those we haven't explicitly covered.
While knowing a few tricks can be helpful, true mastery comes from understanding the underlying building blocks of the language and how they interact. This deeper understanding enables you to solve real-world problems with confidence and creativity.
The initial sections of the course are designed to lay a solid foundation for you. These sections will guide you through the essential concepts and principles you'll need to grasp before delving into the more advanced and complex topics covered later in the course.
Content Description By Sections:
Sections 1,2,3:
Every programming language involves transforming data, and TypeScript is no different. However, what sets TypeScript apart is that types themselves serve as our data. In this course, we'll write programs that manipulate types as input and output other types.
To truly master TypeScript, you'll need a solid understanding of its various data types and structures. In the initial three sections, we'll delve into these concepts, exploring how they relate to the familiar concepts we use at the value level while also highlighting their unique characteristics.
Section 4:
After exploring the various types available to us in the first three sections, it's time to put our knowledge into practice by implementing our first TypeScript algorithms! This is where we transition from theory to practical application, diving into writing actual code using the language of types.
Section 5:
Next, we're going to delve into loops and recursive types. In this section, we'll harness recursion to iterate over tuple types. If recursive algorithms are new to you, the code I'll be demonstrating might seem unfamiliar at first. However, stay patient and keep in mind that we're not just mastering a new programming language, but a functional one at that! Understanding these concepts takes time, and being open to a bit of discomfort is crucial for advancing your skills.
Section 6:
Following that, we'll explore Template Literal Types, an exceptional feature exclusive to TypeScript's type system.
Section 7:
Next up, we'll delve into union types. Union types are remarkable as they allow us to accurately model the finite set of possible states our applications can be in. Without them, our types would be so imprecise that they would hardly be of any value.
Section 8:
In this section, we'll explore loops with mapped types. Here, we'll discover how to transform and filter object types using Mapped Types. We'll combine them with other features of the type system, such as Template Literal Types and Conditional Types, to construct functions with incredibly intelligent type inference.
Sections 9+ (Extra Material):
And finally, you'll find dozens of additional sections filled with even more TypeScript challenges and material to further hone your skills.
When you’ve completed the all the exercises, you’ll reach a point of mastery where you will find yourself as the typescript go-to expert in your team.
Review the course material titles to decide if it aligns with your expectations.
This course is ideal for TypeScript developers seeking to elevate their skills from intermediate to advanced levels. If this resonates with you, then this course is your next step toward mastery!