TypeScript for Beginners: Types, Interfaces, Classes and Generics
A 26-lesson, roughly four-hour introduction to TypeScript for people who already know some JavaScript. It covers setup, basic types, functions, objects, type aliases, unions, tuples, interfaces, class access modifiers, abstract classes, generics and type narrowing. It suits beginners who want a fast, concept-by-concept tour of the language.
Lessons by Hitesh Choudhary on YouTubeCurated by YodaHut. These lessons are hosted on YouTube and produced by their original creators, who are not affiliated with YodaHut. You still earn YodaCoins, keep your streak and track progress here.
What You'll Learn
- Install TypeScript and compile .ts files to JavaScript
- Annotate variables and functions with types, and rely on type inference instead of using any
- Model data with type aliases, interfaces, union types, tuples, readonly and optional properties
- Choose between interface and type for a given situation
- Write classes using public, private and protected members, getters and setters, and abstract classes
- Write generic functions, arrays, arrow functions and classes
- Narrow types with typeof, instanceof, type predicates and discriminated unions with never exhaustiveness checks
Prerequisites
- Working knowledge of JavaScript (variables, functions, objects, classes)
- Node.js and a code editor installed, or willingness to set them up
Course Curriculum
- 1Why Learn TypeScript6:52
- 2What TypeScript Really Is8:23
- 3Installing TypeScript12:14
- 4Introduction to the TypeScript Docs11:54
- 5Number, Boolean and Type Inference7:37
- 6Why You Should Avoid any4:44
- 7Functions in TypeScript11:31
- 8Writing Functions Better in TypeScript12:43
- 9Object Typing Pitfalls9:48
- 10Type Aliases7:19
- 11Readonly and Optional Properties9:51
- 12Union Types14:49
- 13Tuples9:53
- 14Interfaces9:55
- 15Interface vs Type5:22
- 16Public and Private Members6:13
- 17Getters and Setters7:19
- 18Protected Members4:15
- 19Abstract Classes9:37
- 20Introduction to Generics12:28
- 21Generics with Arrays and Arrow Functions8:15
- 22Generic Classes11:15
- 23Type Narrowing9:54
- 24instanceof and Type Predicates9:24
- 25Discriminated Unions and Exhaustiveness Checking with never11:24
- 26Course Wrap-Up3:31
About the Instructor
Hitesh Choudhary
YouTube creator
The lessons in this course were produced by Hitesh Choudhary and are published on YouTube. YodaHut selected and sequenced them into this course; we did not make them, and Hitesh Choudhary is not affiliated with YodaHut.
Visit the channel on YouTubeMore in the Library: Development

Programming, Data Structures and Algorithms using Python (IIT Madras)

Data Structures and Algorithms in Python for Coding Interviews (Hindi)

Data Structures and Algorithms in Python for Coding Interviews

React with TypeScript: Typing Props, Hooks and Reusable Components

Git and GitHub in Hindi: From First Commit to Pull Requests and Rebase

Git and GitHub for Beginners: Commits, Branches, Pull Requests and Collaboration

- 26 lessons
- 3h 57m of video
- Earns YodaCoins & streaks
- Timestamped notes
- Free — hosted on YouTube
No certificate is issued for Library courses.