TypeScriptAdvanced Types

113 items

1

Broken Mutable Mapped Type

Code Quiz
2

Distributive Conditional Types Over Unions

Quiz
3

Advanced Types: Unions to Mapped Types

Slides / Video
4

Conditional Types & Distribution

Flashcard
5

Narrowing, Utility Types & Type Guards

Slides / Video
6

Narrowing, Utility Types & Type Guards

Flashcard
7

Union, Intersection & Utility Types

Slides / Video
8

Union, Intersection & Utility Types

Flashcard
9

Higher-Order Type Manipulation Basics

Flashcard
10

The satisfies Operator

Flashcard
11

Function Overloads

Flashcard
12

typeof Type Operator

Flashcard
13

Branded/Nominal Types

Flashcard
14

Type Compatibility and Assignability

Flashcard
15

Type Widening and Narrowing

Flashcard
16

Variance (Covariance/Contravariance)

Flashcard
17

Structural Typing

Flashcard
18

unique symbol Type

Flashcard
19

Remapping Keys With as

Code Quiz
20

Variance: Covariance and Contravariance

Slides / Video
21

Mapped Types

Slides / Video
22

The infer Keyword Explained

Slides / Video
23

Conditional Types

Slides / Video
24

Indexed Access Types

Slides / Video
25

The keyof Type Operator

Slides / Video
26

The typeof Type Operator

Slides / Video
27

User-Defined Type Guards

Slides / Video
28

Type Guards and Narrowing

Slides / Video
29

Discriminated Unions

Slides / Video
30

Type Aliases in TypeScript

Slides / Video
31

Literal Types in TypeScript

Slides / Video
32

Intersection Types in TypeScript

Slides / Video
33

Union Types in TypeScript

Slides / Video
34

Branded Types via Intersection

Slides / Video
35

const Assertions in TypeScript

Slides / Video
36

Assertion Functions

Slides / Video
37

The unknown Type and Safe Narrowing

Slides / Video
38

The never Type in Advanced Contexts

Slides / Video
39

Distributive Conditional Types

Slides / Video
40

Recursive Types in TypeScript

Slides / Video
41

Advanced Utility Types

Slides / Video
42

TypeScript Utility Types Essentials

Slides / Video
43

Template Literal Types

Slides / Video
44

Key Remapping with as Clause

Slides / Video
45

Conditional Type Syntax

Code Quiz
46

Mapped Type Iteration

Code Quiz
47

Intrinsic String Manipulation Type

Code Quiz
48

Removing Optional Modifier

Code Quiz
49

Extracting Array Element Type

Code Quiz
50

Distributive Conditional Over Union

Code Quiz
51

Building Template Literal Types

Code Quiz
52

Variadic Tuple Missing a Spread

Code Quiz
53

Recursive Type That Never Terminates

Code Quiz
54

satisfies With the Wrong Constraint

Code Quiz
55

Misplaced this Parameter

Code Quiz
56

Mixing Named and Unnamed Tuple Elements

Code Quiz
57

Overload Order Shadows the Specific Case

Code Quiz
58

Intersecting Conflicting Property Types

Code Quiz
59

Unexpected Distribution Over a Union

Code Quiz
60

Utility Type: Pick

Code Quiz
61

Utility Type: Partial

Code Quiz
62

typeof Type Operator

Code Quiz
63

Indexed Access Types

Code Quiz
64

Utility Type: Readonly

Code Quiz
65

Lookup with Union Keys

Code Quiz
66

Utility Type: Required

Code Quiz
67

Utility Type: Omit

Code Quiz
68

Assertion Function Uses Wrong Signature

Code Quiz
69

typeof String With Wrong Casing

Code Quiz
70

Exhaustiveness Check Misses a Case

Code Quiz
71

Type Guard Missing the Predicate

Code Quiz
72

Reversed in Operator Branches

Code Quiz
73

Missing const Assertion Widens Literal

Code Quiz
74

Swapped instanceof Branches

Code Quiz
75

Wrong Property in Union Branch

Code Quiz
76

NonNullable Takes One Argument

Code Quiz
77

Exclude Argument Order

Code Quiz
78

Parameters Needs typeof

Code Quiz
79

InstanceType Needs the Constructor

Code Quiz
80

ReturnType Needs typeof

Code Quiz
81

Extract vs Exclude

Code Quiz
82

Awaited Unwraps the Promise

Code Quiz
83

Record Needs Two Type Arguments

Code Quiz
84

Discriminated Unions

Quiz
85

Branded / Nominal Types

Quiz
86

The in Operator Narrowing

Quiz
87

NonNullable, Awaited, InstanceType

Quiz
88

Utility Type: Readonly

Quiz
89

ReturnType and Parameters

Quiz
90

Distributive Conditional Types

Quiz
91

Indexed Access Types

Quiz
92

Utility Type: Record

Quiz
93

Variadic Tuple Types

Quiz
94

The keyof Operator

Quiz
95

Utility Type: Partial

Quiz
96

Template Literal Types

Quiz
97

User-Defined Type Guards

Quiz
98

Intrinsic String Types

Quiz
99

The infer Keyword

Quiz
100

Mapping Modifiers

Quiz
101

The satisfies Operator

Quiz
102

The typeof Type Operator

Quiz
103

Exclude and Extract

Quiz
104

Key Remapping with as

Quiz
105

Recursive Types

Quiz
106

Conditional Types Basics

Quiz
107

Assertion Functions

Quiz
108

Utility Type: Required

Quiz
109

Mapped Types Basics

Quiz
110

Function Overloads Resolution

Quiz
111

Utility Type: Pick

Quiz
112

Utility Type: Omit

Quiz
113

const Assertions

Quiz
Code QuizAdvanced

Utility Type: Pick

Pick takes exactly two type arguments: the source type and a union of keys.

Codetypescript
interface User {
  id: number;
  name: string;
  email: string;
}

type UserPreview = Pick<User, "id", "name">;

const p: UserPreview = { id: 1, name: "Ada" };

What is the bug in this code?