Grokking TypeScript
Learn TypeScript step by step: types, functions, interfaces, classes, generics, advanced types, async code, modules, and React, tested on TypeScript 7.

Course Overview
TypeScript adds a type system to JavaScript. You describe what each value should be, and the compiler checks your code against that description before the program runs. The types are then removed, so the program that runs is plain JavaScript. This course teaches you to write those types and to predict what the compiler will report, infer, and leave unchecked. You start with type annotations and inference, then learn unions, literal types, and enums. Next you type functions, describe objects with interfaces, and build classes with inheritance and abstract classes. The middle of the course covers generics and advanced types: type guards, conditional types, mapped types, template literal types, and utility types. Later chapters apply the types to real work. You type promises and API responses, organize code with modules, and type React components and hooks. The last chapter covers compile time in large projects, strict mode, and common mistakes. Every example was compiled and run on TypeScript 7, so the errors you read are the errors the compiler printed. Every chapter ends with an assessment that explains each answer.
What you'll learn in Grokking TypeScript
- Explain what the compiler checks, what it leaves unchecked, and why types are removed before a program runs.
- Type functions with call signatures, optional, default, and rest parameters, arrow functions, and overloads.
- Build classes with inheritance, static members, access modifiers, readonly properties, accessors, and abstract classes.
- Narrow values safely with type guards, and know when a type assertion hides a mistake.
- Type promises, async functions, and API responses, and handle the failures that Fetch and Axios report differently.
- Type React components, props, events, and hooks.
- Work with strict mode and avoid common mistakes like overusing any.
- Use type annotations and inference, unions, literal types, enums, and intersections in everyday code.
- Describe objects with object types and interfaces, and decide when to use an interface or a type alias.
- Write generic functions, classes, and interfaces, and limit them with constraints.
- Create new types with conditional types, mapped types, template literal types, recursive types, and utility types.
- Organize code with modules, named and default exports, re-exports, and index files, and read older code that uses namespaces.
- Reduce compile time in large projects with incremental builds and project references.
Course Content
Object Types and Interfaces
Classes and Object-Oriented Programming
Modules and Namespaces
Performance Optimization and Best Practices
What people say about our courses






About the Author

Arslan Ahmad
Industry Expertise & Leadership
Arslan Ahmad is the lead author of Grokking TypeScript. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.
He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.
The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.
500+
Interviews Conducted
10k+
Students Taught
Related Courses
$197
$48
$48
FAQs
What is Grokking TypeScript?
It is a course on TypeScript, the language that adds a type system to JavaScript. It starts with type annotations and inference, then covers functions, object types and interfaces, classes, generics, advanced types, asynchronous code, modules, React, compile-time performance, and common mistakes.
Who is this course for?
It is for JavaScript developers who have not used TypeScript or any other typed language, and for developers who already use TypeScript and want to understand what the compiler is doing. It does not assume any earlier experience with types.
What do I need to know before I start?
You need a working knowledge of JavaScript. The chapter on TypeScript with React also assumes that you know React basics, and you can skip it if you do not use React.
What do I need to follow along?
You need Node.js and a code editor. An early lesson shows how to install the compiler, and the React chapter shows how to create a project with Vite. The course does not include a coding environment in the browser, so you run the examples on your own computer.
Which version of TypeScript does the course use?
The examples were compiled and run on TypeScript 7, the current release at the time of the review, and the compiler errors in the lessons are real output. The lessons also say where current behavior differs from older projects, like strict mode being on by default.
Are there quizzes or assessments?
Yes. Every chapter ends with an assessment, and each attempt draws a set of questions from a larger pool, so a second attempt gives you different questions. Most questions describe a piece of code and ask what the compiler reports or infers, and every option comes with an explanation.
Does the course cover generics and advanced types?
Yes. You write generic functions, classes, and interfaces and limit them with constraints. You then learn type guards, type assertions, conditional types with infer, mapped types, template literal types, recursive types, and the built-in utility types.
Does the course cover TypeScript with React?
Yes. You set up a project, type components and props, type events and callback props, and type the useState, useEffect, useRef, useContext, and useReducer hooks. The examples were run on React 19.
Does TypeScript check my data when the program runs?
No, and the course explains why. Types are removed before the program runs, so a type on an API response is only a claim about the data. The lessons show what happens when that claim is wrong, and how to check the data yourself.
What does the course not cover?
It does not teach decorators, testing, writing declaration files, backend frameworks, or frameworks built on React like Next.js. You will need other material for those subjects.
