01Chapter 1: Structural vs nominal typingYou should know basic TypeScript syntax, including type annotations, interfaces, and type aliases. You should also be familiar with JavaScript objects, classes, and functions.2 min read
02Chapter 2: Assignability: does the shape fit?This chapter assumes that you know basic TypeScript syntax, including type annotations, interfaces, type aliases, and functions. You should also be comfortable with JavaScript objects and their properties.2 min read
03Chapter 3: Object shapes and extra propertiesThis chapter assumes basic TypeScript syntax, including interfaces, type aliases, object literals, and function parameters. It also assumes you know that a type annotation is checked at compile time and does not change the JavaScript object at runtime.2 min read
04Chapter 4: Excess property checks on object literalsThis chapter assumes you know basic TypeScript type annotations, interfaces, type aliases, objects, and functions. It also assumes you understand structural typing: TypeScript usually compares the members a value has rather than the name of its type.2 min read
05Chapter 5: Optional and readonly propertiesAssume you know basic TypeScript annotations, interfaces, type aliases, JavaScript objects, and functions. This chapter focuses on how optional and readonly members change object compatibility and what you can do through a typed reference.2 min read
06Chapter 6: Interfaces and type aliases are the same to the checkerAssume you know basic TypeScript syntax, including type annotations, interfaces, type aliases, objects, and functions. This chapter focuses on one rule: TypeScript usually compares the structure of a type, not whether the type came from an interface declaration or a type alias.2 min read
07Chapter 7: Comparing function typesThis chapter assumes you know basic TypeScript annotations, interfaces, type aliases, and JavaScript functions. The same structural idea used for objects also applies to function types, but function parameters and return values follow different compatibility rules.2 min read
08Chapter 8: Classes and private membersAssume you know basic TypeScript classes, interfaces, type aliases, and assignability. This chapter focuses on how TypeScript compares class instances.2 min read
09Chapter 9: Weak type detectionAssume you know basic interfaces, type aliases, object types, and assignments. This chapter focuses on one extra check TypeScript applies to weak types.2 min read
10Chapter 10: Parameter variance and strictFunctionTypesAssume you know TypeScript function types, interfaces, and subtype relationships. This chapter focuses on how TypeScript decides whether one function can replace another, especially when their parameter types differ.2 min read
11Chapter 11: Generic types and unused type parametersAssume you know basic TypeScript types, interfaces, type aliases, and JavaScript objects. This chapter focuses on how TypeScript compares two generic types after their type arguments are supplied.2 min read
12Chapter 12: Branded types for nominal-style safetyThis chapter assumes basic TypeScript syntax, including type annotations, interfaces, type aliases, and functions. It also assumes you understand that TypeScript normally uses structural typing: a value is assignable when it has the required shape.2 min read
13Chapter 13: Pitfalls: Object.keys and runtime extra propertiesAssume you know basic TypeScript type annotations, interfaces, type aliases, and JavaScript objects. This chapter focuses on a boundary between TypeScript's compile-time model and JavaScript's runtime behavior.2 min read