Chapter 1. Introduction to typing
2.1. Designing functions that don’t return values
2.2. Boolean logic and short circuits
2.3. Common pitfalls of numerical types
2.3.1. Integer types and overflow
2.3.2. Floating-point types and rounding
2.5. Building data structures with arrays and references
Designing functions that don’t return values
Boolean logic and short circuits
3.2. Expressing either-or with types
4.1. Avoiding primitive obsession to prevent misinterpretation
4.1.1. The Mars Climate Orbiter
4.2.1. Enforcing constraints with the constructor
4.4. Hiding and restoring type information
5.1. A simple strategy pattern
5.2. A state machine without switch statements
5.2.1. Early Programming with Types
5.3. Avoiding expensive computation with lazy values
5.4. Using map, filter, and reduce
A state machine without switch statements
Chapter 6. Advanced applications of function types
6.1. A simple decorator pattern
6.2.1. An object-oriented counter
6.3. Executing long-running operations asynchronously
6.3.2. Asynchronous execution: callbacks
6.3.3. Asynchronous execution models
6.4. Simplifying asynchronous code
7.1. Distinguishing between similar types in TypeScript
7.1.1. Structural and nominal subtyping pros and cons
7.2. Assigning anything to, assigning to anything
7.3.1. Subtyping and sum types
7.3.2. Subtyping and collections
7.3.3. Subtyping and function return types
Distinguishing between similar types in TypeScript
Chapter 8. Elements of object-oriented programming
8.1. Defining contracts with interfaces
8.2. Inheriting data and behavior
8.3. Composing data and behavior
8.3.1. The has-a rule of thumb
8.4. Extending data and behavior
8.4.1. Extending behavior with composition
8.5. Alternatives to purely object-oriented code
Chapter 9. Generic data structures
9.2.1. Generic data structures
9.3. Traversing any data structure
Chapter 10. Generic algorithms and iterators
10.1. Better map(), filter(), reduce()
10.2.1. Algorithms instead of loops
10.3. Constraining type parameters
10.3.1. Generic data structures with type constraints
10.4. Efficient reverse and other algorithms using iterators
10.4.1. Iterator building blocks
10.4.3. An efficient reverse()
Better map(), filter(), reduce()
Chapter 11. Higher kinded types and beyond
11.1. An even more general map
11.1.1. Processing results or propagating errors
11.1.2. Mix-and-match function application
11.1.3. Functors and higher kinded types
11.2.2. Difference between map() and bind()
11.3.1. Functional programming
A. TypeScript installation and source code
3.128.199.88