TypeScript Typing Practice Chapters
150 exercises across 19 chapters, ordered from basic syntax to advanced patterns. Each section is real TypeScript code, and your best speed and accuracy are saved per section.
TypeScript Basics
Learn TypeScript fundamentals
Basic Types
Interfaces
Type Aliases
Enums
Union Types
Function Types
Arrays and Tuples
Object Types
Type Assertions
Literal Types
Null and Undefined
Type Inference
Functions in Depth
Typed parameters, overloads, and higher-order functions
Optional Parameters
Default Parameters
Rest Parameters
Arrow Function Types
Function Overloads
Void and Never
Typed Callbacks
The this Parameter
Generic Functions
Higher-Order Functions
Classes & OOP
Master TypeScript classes, inheritance, and access control
Class Basics
Parameter Properties
Access Modifiers
Readonly Properties
Getters and Setters
Inheritance
Abstract Classes
Implementing Interfaces
Static Members
Generic Classes
Narrowing
Narrow union types safely with guards and discriminants
Typeof Narrowing
Instanceof Narrowing
The in Operator
Discriminated Unions
Truthiness Narrowing
Equality Narrowing
Assertion Functions
Exhaustiveness Checks
Narrowing in Arrays
Modern Syntax
Optional chaining, nullish coalescing, satisfies, and const assertions
Optional Chaining
Nullish Coalescing
The satisfies Operator
Const Assertions
Typed Destructuring
Spread with Types
Non-Null Assertion
Keyof Typeof
Index Signatures
Error Handling
Type-safe error handling from try/catch to result types
Try/Catch Basics
Unknown in Catch
Custom Error Classes
Narrowing Error Types
Result Pattern
Async Error Handling
Rethrowing with Context
Typed Error Callbacks
Generics in Depth
Constraints, defaults, and generic design
Generic Constraints
Generic Defaults
Generic Interfaces
Generic Class Patterns
Generic Factories
Variadic Tuples
Generic Promise Wrappers
Generic Type Guards
Generic Builders
Mixed Generics Practice
Advanced Types
Master TypeScript's type system
Generics
Utility Types
Mapped Types
Conditional Types
Template Literal Types
Intersection Types
Index Types
Infer Keyword
Type Guards
Recursive Types
Advanced Types
Conditional types and type manipulation
Distributive Conditional Types
Type Predicates
Type Operators
Utility Types in Depth
Partial, Pick, Omit, Record, and building your own
Partial and Required
Pick and Omit
Record
Exclude and Extract
NonNullable
ReturnType and Parameters
Awaited
Readonly and ReadonlyArray
Custom Utility Types
Mixed Utility Practice
Real-World Patterns
The typed code you actually write: APIs, events, and collections
Typed Fetch
API Response Types
Typed Event Handlers
Typed Maps and Sets
Readonly Collections
Builder Pattern
Typed Config Objects
Safe JSON Parsing
Branded Types
Typed Storage Wrapper
Typed Debounce
API & Data Modeling
DTOs, envelopes, and typed boundaries
Response Envelopes
Pagination Types
DTO to Domain Mapping
Typed IDs
Nullable Fields
Status Unions
Typed Query Params
Date Serialization
Validation Guards
Mixed API Practice
React & JSX Typing
Props, hooks, events, and refs with types
Component Props
Children Prop
useState with Generics
Event Handler Types
useRef Types
Custom Hook Types
Context Types
useReducer Types
Discriminated Props
Mixed React Practice
Node & Tooling Patterns
Typed environment, filesystem, and server code
Typed process.env
fs/promises
path and URL
Typed HTTP Handlers
Express Types
Typed EventEmitter
CLI Argument Parsing
JSON Module Types
Timers as Promises
Mixed Node Practice
Decorators
Work with TypeScript decorators
Class Decorators
Method Decorators
Property Decorators
Parameter Decorators
Accessor Decorators
Decorator Factories
Modules & Namespaces
Organizing code with modules
ES Modules
Namespaces
Module Augmentation
Async Programming
Async/await and Promise handling
Promises
Async/Await
Promise Combinators
Tooling & Configuration
TypeScript compiler and configuration
TSConfig
Compiler API
Project References
Testing
Testing TypeScript applications
