Learn TypeScript Programming
Build your understanding from JavaScript and TypeScript fundamentals through functions, types, tooling, applications and projects. Start with Introduction to TypeScript and follow the lessons in order.
18 lesson groups · 311 planned lessons · 311 currently available.
Lessons with links are ready to study. Upcoming lessons remain visible in the locked roadmap and will become links when their content is added.
1. Getting Started with TypeScript
- Introduction to TypeScript
- TypeScript vs JavaScript
- Features of TypeScript
- Why Learn TypeScript?
- How TypeScript Works
- Installing Node.js
- Installing TypeScript
- Setting Up TypeScript in VS Code
- Your First TypeScript Program
- Structure of a TypeScript Program
- Compiling TypeScript to JavaScript
- Running TypeScript Programs
- TypeScript Playground
- Understanding Compile-Time vs Runtime
2. TypeScript Basics
- TypeScript Syntax
- TypeScript Comments
- Variables in TypeScript
- let, const, and var
- Type Annotations
- Type Inference
- The number Type
- The string Type
- The boolean Type
- null and undefined
- The bigint and symbol Types
- The any Type
- The unknown Type
- The void Type
- The never Type
- Type Assertions
- Non-Null Assertions
- TypeScript Input and Output
3. Operators and Control Flow
- TypeScript Operators
- Arithmetic Operators
- Assignment Operators
- Comparison Operators
- Logical Operators
- Equality Operators
- Optional Chaining
- Nullish Coalescing
- if Statement
- if...else Statement
- else if Statement
- Nested if Statements
- switch Statement
- for Loop
- while Loop
- do...while Loop
- for...of Loop
- for...in Loop
- break Statement
- continue Statement
- Variable Scope
4. Functions in TypeScript
- Introduction to Functions
- Function Declarations
- Function Expressions
- Arrow Functions
- Function Parameters
- Function Return Types
- Optional Parameters
- Default Parameters
- Rest Parameters
- Function Overloading
- Anonymous Functions
- Callback Functions
- Higher-Order Functions
- Closures
- Recursive Functions
- Typing the this Parameter
5. Arrays, Tuples, and Strings
- TypeScript Arrays
- Array Type Annotations
- Accessing and Updating Arrays
- Iterating Over Arrays
- Array Methods
- map(), filter(), and reduce()
- Readonly Arrays
- Multidimensional Arrays
- Introduction to Tuples
- Optional and Rest Tuple Elements
- Readonly Tuples
- TypeScript Strings
- String Methods
- Template Literals
- Working with Unicode Strings
6. Objects, Interfaces, and Type Aliases
- Objects in TypeScript
- Object Type Annotations
- Optional Properties
- Readonly Properties
- Nested Objects
- Object Destructuring
- Object Spread and Rest
- Introduction to Type Aliases
- Introduction to Interfaces
- Interface Properties and Methods
- Extending Interfaces
- Type Aliases vs Interfaces
- Index Signatures
- Excess Property Checks
- Structural Typing
- The satisfies Operator
7. Union Types, Intersection Types, and Type Narrowing
- Union Types
- Intersection Types
- Literal Types
- String and Numeric Literal Types
- Discriminated Unions
- Introduction to Type Narrowing
- typeof Narrowing
- Truthiness Narrowing
- Equality Narrowing
- The in Operator for Narrowing
- instanceof Narrowing
- Control Flow Analysis
- User-Defined Type Guards
- Type Predicates
- Assertion Functions
- Handling Nullable Values
- Exhaustive Checks with never
8. Classes and Object-Oriented Programming
- Introduction to Classes
- Creating Classes and Objects
- Constructors
- Class Properties
- Class Methods
- Access Modifiers
- public, private, and protected
- Readonly Class Properties
- Parameter Properties
- Getters and Setters
- Static Properties and Methods
- Class Inheritance
- Method Overriding
- Abstract Classes
- Implementing Interfaces
- ECMAScript Private Fields
9. Generics in TypeScript
10. Advanced TypeScript Types
- Understanding Type-Level Programming
- The keyof Type Operator
- The typeof Type Operator
- Indexed Access Types
- Mapped Types
- Mapping Modifiers
- Key Remapping in Mapped Types
- Conditional Types
- Distributive Conditional Types
- The infer Keyword
- Template Literal Types
- Intrinsic String Manipulation Types
- Built-In Utility Types
- Partial, Required, and Readonly
- Pick, Omit, and Record
- Exclude, Extract, and NonNullable
- Parameters, ReturnType, and Awaited
- Recursive Types
- Variance in TypeScript
- Type Compatibility and Type System Limitations
11. Modules, Packages, and Type Declarations
- Introduction to Modules
- ES Modules in TypeScript
- Exporting Variables, Functions, and Classes
- Named and Default Exports
- Importing Modules
- Type-Only Imports and Exports
- Dynamic Imports
- Organizing Code Across Files
- Understanding package.json
- CommonJS vs ES Modules
- Module Resolution
- NodeNext and Bundler Resolution
- Declaration Files (.d.ts)
- Installing Type Definitions with @types
- Ambient Declarations
- Declaration Merging
- Global Type Augmentation
- Namespaces in TypeScript
- Building and Publishing Typed Packages
12. Asynchronous Programming and Error Handling
- Introduction to Asynchronous JavaScript
- Understanding the Event Loop
- Promises in TypeScript
- Typing Promises
- async Functions
- The await Keyword
- Promise.all()
- Promise.allSettled() and Promise.race()
- try...catch...finally
- Handling unknown Errors
- Creating Custom Error Classes
- Result Types for Error Handling
- Fetch API with TypeScript
- Cancelling Operations with AbortController
- Async Iterators and for await...of
- Resource Management with using and await using
13. TypeScript for Browser and Node.js Development
- TypeScript in the Browser
- Understanding DOM Types
- Selecting HTML Elements
- Working with DOM Events
- Handling HTML Forms
- Creating and Updating DOM Elements
- Fetching Data from APIs
- Browser Storage APIs
- Working with URLs and Query Parameters
- Web Workers with TypeScript
- TypeScript with Node.js
- Node.js Type Definitions
- Reading and Writing Files
- Working with Paths and Directories
- Environment Variables
- Building Command-Line Applications
- Working with Node.js Streams
14. TypeScript Configuration and Development Tools
- Introduction to tsconfig.json
- Understanding TypeScript Compiler Options
- Configuring target and lib
- Configuring module and moduleResolution
- Understanding strict Mode
- strictNullChecks
- noImplicitAny
- strictFunctionTypes
- noUncheckedIndexedAccess
- exactOptionalPropertyTypes
- Configuring rootDir and outDir
- Source Maps and Debugging
- noEmit and emit Options
- Declaration File Generation
- Incremental Compilation
- Project References
- TypeScript with npm Scripts
- Using TypeScript with Bundlers
- Running TypeScript with Native Runtime Support
- TypeScript ESLint and Prettier
- Migrating JavaScript Projects to TypeScript
- Upgrading TypeScript Versions
15. Testing, Debugging, and Code Quality
- Introduction to Testing TypeScript
- Writing Unit Tests
- Testing with Vitest or Jest
- Testing Asynchronous Functions
- Mocking Dependencies
- Testing Classes and Interfaces
- Testing API Clients
- Testing Type Definitions
- Using @ts-expect-error
- Integration Testing
- Test Coverage
- Debugging TypeScript Programs
- Understanding TypeScript Compiler Errors
- Static Analysis and Linting
- Runtime Data Validation
- Refactoring TypeScript Code
- Continuous Integration for TypeScript
16. Building Real-World Applications with TypeScript
- TypeScript Application Architecture
- Organizing Large TypeScript Projects
- Designing Typed API Contracts
- Data Transfer Objects (DTOs)
- Schema Validation with TypeScript
- Dependency Injection
- Configuration Management
- Structured Error Handling
- Building REST APIs with Node.js
- TypeScript with Express or Fastify
- Introduction to React with TypeScript
- Understanding TSX
- Typing React Props and State
- Typing React Events and Hooks
- Forms and Validation in React
- Database Integration with TypeScript
- Authentication and Authorization
- Security Best Practices
- Logging and Observability
- Building and Deploying TypeScript Applications
17. TypeScript Programming Examples
- Basic TypeScript Programs
- Number Programs
- Mathematical Programs
- String Programs
- Array Programs
- Tuple Programs
- Object Programs
- Map and Set Programs
- Function Programs
- Recursion Programs
- Interface Programs
- Class Programs
- Generic Programming Examples
- Type Narrowing Examples
- Promise and Async Programs
- DOM Manipulation Examples
- File Handling Programs
- API Integration Examples
18. TypeScript Projects
- Command-Line Calculator
- Number Guessing Game
- Student Marks Manager
- Contact Management System
- Command-Line To-Do Application
- Expense Tracker
- Quiz Application
- File Organizer
- Form Validation Application
- GitHub Profile Finder
- Weather Dashboard
- REST API Client
- Task Management REST API
- URL Shortener
- React Task Management Application
- Full-Stack TypeScript Application
