
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore how TypeScript, a strongly typed superset of JavaScript, adds static typing and better tooling at any scale, compiling TypeScript code into JavaScript for Node.js and web apps.
Compare JavaScript's dynamic typing with TypeScript's static type system, highlighting type inference, compile-time checking, and how explicit types prevent runtime errors.
Learn that null and undefined are two separate types representing absence in TypeScript, not interchangeable in code, with null requiring explicit assignment and undefined signaling unassigned values.
Understand why BigInt was introduced to handle numbers beyond the maximum safe integer in JavaScript, and how to declare BigInt using the constructor or a numeric literal ending in n.
Explains how symbols serve as unique primitive values and private object keys in JavaScript and TypeScript, using symbol constructor, annotation, and a getId method.
Practice assigning explicit types to variables in the TypeScript file in resources, avoid hover-based inference of missing type annotations, and preview the next video solution.
Delve into TypeScript's type system and its internal mechanics to build type safe apps. Master any, unknown, and union types, with annotations, inference, declarations, and custom types for a hierarchy.
Examine how any type acts as the default JavaScript behavior and why you should use stricter types. Understand implicit any and the tsconfig noImplicitAny option for type safety.
Declare type aliases with the type keyword in TypeScript, creating custom string, number, date, and symbol that map to JavaScript types, and explore TypeScript's inference and automatic conversion.
Explore the differences between annotation, inference, and declaration in TypeScript, learn how duck typing guides type inference, when to declare or annotate, and how to handle simple versus complex types.
Explore union types in TypeScript, from string or number unions to type aliases, the pipe operator, and undefined in a print function with optional inputs.
Explore conditional types in TypeScript by using a ternary operator to define type aliases, such as true string and conditional number, and see how extends checks shape type assignments.
Understand the TypeScript type hierarchy, where moving down yields stricter types and moving up yields more liberal types, with examples like any, string, unknown, and never shaping subtyping. Explore how array, object, and tuple relate, learn to prefer the most specific type, and reference the never type and diagram in future lessons.
Explore type casting in TypeScript using angle brackets and the as syntax to cast values to any or a defined type, including API fetched objects.
Explore TypeScript's type system through practical examples of literals, unions, maps, and arrays, plus type aliases and conditional types, then see compile-time checks on reassignments and type mismatches.
Explore how to declare and strictly type objects in TypeScript, using inference and annotations. Learn to enforce object shapes with object literals and properties like brand and color.
discover how to strictly type objects in TypeScript by defining a type alias for a post with title, content, and date, and reuse it to avoid repeating object annotations.
Explore strictly typing nested objects in TypeScript by defining an author with name, age, and email, and reuse it via a dedicated author type alias.
Use index signatures to strictly type dynamic object properties in TypeScript, modeling an awards object as string keys mapping to award details with name and date.
Define optional and read only properties in TypeScript by marking properties with a question mark and using the read only keyword, ensuring properties may be present or immutable after assignment.
Explore how TypeScript unions for objects combine dog and cat types, requiring a value to include all properties of at least one side (name, barks or purrs), with optional extras.
Learn how discriminating unions in TypeScript use a common literal state to distinguish loading, failed, and success network states, enabling safe access to code or response data.
Explore intersection types in TypeScript by combining two object types to form a hybrid with both common and unique properties, using ampersand for intersection.
Practice strictly typing an airplane object in TypeScript, using type aliases or annotations, and apply concepts learned in previous videos.
Create and apply strict types to an airplane object using TypeScript type aliases. Define caterer and seats with an index signature and use string, date, and number types.
Master strictly typing arrays in TypeScript using array literal syntax or the array interface with generics, including unions and arrays of objects like airplanes.
Explore TypeScript tuples, enforcing fixed-length, fixed-shape arrays, declaring tuple types with optional elements and the rest operator, and leveraging type aliases in practical examples.
Discover how enums compile to JavaScript and become runtime objects you can use in code, unlike type definitions, with examples like direction and roles transformed into objects.
Compare objects and enums in TypeScript, focusing on const enums that compile to values. See how a read-only object can act like an enum and when to use each.
Practice exercises on arrays and enums help you revise concepts from this section. Access the resource file, try them yourself, and watch the next video for the solution.
Master TypeScript basics by building typed arrays, string arrays, and a read-only array and tuple, then create a status enum and an object that emulates an enum.
Declare strictly typed functions in TypeScript by typing parameters name and age and returning a string, using function declarations, function expressions, and arrow functions with template literals and unions.
Explore how to use default and optional parameters in TypeScript, including declaring them and handling an optional country argument in function calls.
Apply type aliases to strictly annotate parameter and return types in a TypeScript example, converting a person’s age from years to months using a year or month age unit.
Learn how to strictly annotate object functions with function call signatures in TypeScript, define parameters and return types, and use type aliases to enforce precise greetings.
Explore void and never types in TypeScript by strictly typing functions that don’t return, and compare when to use void versus never, including their relationship and practical examples.
Explore rest parameters in TypeScript to type unlimited function arguments, using the rest operator to handle a number array, map results, and enforce fixed-length tuples for two-argument functions.
Learn parameter destructuring in TypeScript by extracting a, b, and c from a numbers object, infer their types, and enforce strict typing with type errors when values don't match.
Explore how TypeScript uses function overloading to handle varying arguments and return values, illustrated by a reservation example with one-way and return-trip options and call signatures.
Explore function overloading in TypeScript by defining multiple call signatures for a reservation function, using an object-like overload structure, and leveraging union and never types to handle multiple argument scenarios.
Practice applying functions in TypeScript by solving the provided practice problems, using the exercise link in resources, and join the next video to review solutions together.
Demonstrates TypeScript functions and types by building greet, a product type, getProduct, a calculator signature with add and subtract, and logMessage and throwError utilities within a React + NodeJS project.
Explore generics in TypeScript function declarations with a get first element function for any array using a generic type T. Learn how type aliases and inference affect return types.
Explore generics with arrays and other length-bearing types by applying a has length constraint, define a log length function, and use generic extends to enforce the length property in TypeScript.
Explore using generics with objects in TypeScript by defining a generic key value pair, applying constraints like has ID, and printing object IDs with a type-safe approach.
Learn how to assign default values to generics in TypeScript using an async fetch data function and a post type with userId, id, title, and body.
Develop a practical, polymorphic filter in TypeScript using generics and a predicate. Validate it with numbers and animals, returning only items that meet the condition.
Apply generics to a filter function to replace overloads, enabling strict typing across arrays of any type and return an array inferred as the element type.
Discover how TypeScript classes serve as blueprints to create object instances with shared properties and methods, such as name, email, and a greet method.
Create a TypeScript class as a blueprint for a user with name, email, and a greet method. Instantiate with new to produce an instance and see the properties.
Use the this keyword to assign constructor parameters to class fields and access them with dot notation in TypeScript. Understand initialization checks and dynamic, per-instance properties.
See how TypeScript treats classes as blueprints that define object types, enforcing properties and methods in each instance. Learn to use classes as types with strict typing and type inference.
Learn how inheritance works in TypeScript by extending a user class to create admin, which inherits user properties and adds an is admin property via the extends keyword.
Explore how to implement constructors in a derived admin class, invoke the parent constructor with super, and manage dynamic properties like name, email, last name, and users reporting in TypeScript.
Practice class concepts with a hands-on exercise, using the better comments VSCode extension to read highlighted JavaScript comments. Find the exercise link in the resources section and try it yourself.
Explore how public access modifiers in TypeScript make class properties and methods accessible in parent and child classes and in instances, with defaults and explicit declarations.
Explore protected properties in TypeScript, where access stays within the parent and child classes but does not appear on the final object, unlike public properties.
Understand how private properties restrict access to the parent class only, not the child or final objects, via a user class example.
Choose access modifiers in TypeScript by starting private, using protected for subclass access, and only making properties or methods public when needed outside the class in the final instance.
Override methods in child classes in TypeScript by redefining greet with the same signature to produce different string outputs for user and admin instances.
Learn how to enforce age validation in the TypeScript class constructor and use accessors and mutators to expose full name as a property.
Explore static members in TypeScript using the static keyword to define class properties and methods, like a counter and its increment method, accessible without instantiating a class.
Learn how static blocks initialize a class by setting static members using an external source or external information, differentiate static blocks from constructors, and understand class initialization versus instantiation.
Discover how generics work with classes in TypeScript, using a box example with a generic type, getters and setters, and type-safe number and string boxes.
Explore how mixins in TypeScript act as a pattern that take a class and return a new class with added properties or methods, enabling time stamp features across multiple classes.
Master TypeScript classes by building an employee and a manager, using public, private, protected properties, constructor shorthand, salary getters/setters, a static company name, and a getDetails override with department.
Explore abstract classes and interfaces in TypeScript, starting with static members and inheritance, then mastering abstract methods and constructor properties inside abstract classes, followed by interfaces, generics, and access modifiers.
Explore abstract classes in TypeScript by turning a department class into an abstract base and enforcing child classes like IT and Admin to implement the holidays property.
Demonstrate how a protected constructor in the abstract department class restricts instantiation to child classes like IT and admin departments. See how super calls assign names and prevent misnamed instances.
Add holidays to separate department child classes in a TypeScript project by invoking the shared add holidays method on IT and admin departments, demonstrating per-class holiday lists and inheritance.
Implement a print holidays method in the department class to print holidays to the console, handle no holidays, and list each holiday with its reason and date.
Override the print holidays method in child classes to print department-specific headings and holidays for IT department and admin department, using the same parameters as the parent method.
Convert the print holidays method to an abstract method in the department class to enforce implementation by every child class, ensuring a consistent signature and contract across TypeScript.
Explore how interfaces act as binding contracts in applications, illustrate with user and admin interfaces, and show TypeScript implementations and an auth flow using a login method.
Explore how TypeScript interfaces act as contracts that define object structures, using the interface keyword to enforce properties like name, email, and age, with optional phone and greet call signatures.
Explore how to inherit from multiple interfaces in TypeScript by building an admin user that extends user, role, and permissions interfaces, with roles and permissions enums and a reporting count.
Explore how three generics power a flexible automobile interface by passing enums or primitive types for type, brand, and colors, illustrated with Ferrari, Honda, and Toyota examples.
Learn how to apply interfaces to classes in TypeScript by implementing a car class that fulfills an automobile interface contract, using generics and the implements keyword to generate typed objects.
Apply TypeScript to implement multiple interfaces in a truck class, adding a commercial vehicle interface with capacity and license renewal date, and build modular code shared across classes.
TypeScript lets a class inherit from a single parent class but can implement multiple interfaces, solving the multiple inheritance issue and enabling more flexible designs.
Explore declaration merging in TypeScript by declaring interfaces with the same name and merging properties, as shown with a user interface including id, name, and password hash.
Compare types and interfaces in TypeScript, including union types, intersection types, and tuples. Learn how interfaces merge, how they extend and implement in classes, and why types cannot merge.
Explore the differences between abstract classes and interfaces in TypeScript, including binding contracts, implementations, and how each defines properties like name, email, and phone.
Compare interfaces and abstract classes in TypeScript by showing how interfaces declare greetings as call signatures without implementations, while abstract classes provide concrete methods and static methods.
Explore the TypeScript compiler and tsconfig options to shape file handling. Configure type checking, file watchers, source maps, and npm scripts for development and production workflows.
Explore how the TypeScript compiler converts ts files like index.ts to js, loads them via index.html, and uses a tsconfig-based root directory with watch script to generate app.js and more.
Explore how the tsconfig exclude and include options control what TypeScript compiles, including handling of node_modules and wildcard patterns. Learn practical examples to finely tune your project's compilation scope.
Learn to configure tsconfig with rootDir and outDir to restrict TypeScript source files to src and emit JavaScript to dist, demonstrated by moving app.ts and generating app.js.
Explore how the tsconfig target sets the JavaScript output version for TypeScript, factors affecting choice like browser, React, or Node environments, and how boilerplates reference ES5 with development resources.
Enable source maps in tsconfig to debug TypeScript directly in the browser, view app.ts instead of app.js, and set breakpoints with the Chrome debugger using app.js.map.
This isn’t just another TypeScript course—it’s the most up-to-date, comprehensive course available, fully updated in 2025 to align with the latest version of TypeScript and the most modern development practices.
And yes, I’ll teach you TypeScript from scratch! Whether you’re a beginner or an experienced JavaScript developer, this course covers everything you need to master TypeScript.
You'll learn all the essential concepts, including:
Type Declarations & Inference – Understand how TypeScript manages types dynamically
Interfaces & Type Aliases – Create structured, reusable code with confidence.
Classes & Object-Oriented Programming (OOP) – Master encapsulation, inheritance, and polymorphism in TypeScript.
Decorators (Stage 2 & Stage 3) – Implement powerful meta-programming techniques in your projects.
Generics – Write scalable, reusable functions and components.
Mapped & Conditional Types – Take type safety to the next level.
Modules & Namespaces – Organize and structure your code efficiently.
TypeScript Compiler (tsc) & Configuration – Learn how TypeScript compiles into JavaScript and how to configure it for different environments.
Advanced TypeScript Features – Utility types, infer keyword, keyof operator, and template literal types.
The Inner Workings of TypeScript – Go under the hood to understand how TypeScript interprets and enforces type safety.
And Lots More (See Curriculm for extensive list)
This course isn’t just about learning TypeScript in isolation. You’ll also apply it to build real-world applications using the latest tools and frameworks:
Frontend Development – Use TypeScript with React, ShadcnUI, TailwindCSS, and TanStack Query.
Backend Development – Build a robust Node.js API with Express, Mongoose, and MongoDB using TypeScript
By the end of this course, you’ll have mastered TypeScript in its entirety, gaining the skills to write scalable, high-performance applications that follow industry best practices.
This course contains 300+ Videos which in total contain more than 25 hours of content. I teach you the latest features of TypeScript in a very practical manner providing you with the in-depth knowledge you need to master TypeScript.
Once we are through with the theoretical part of the TypeScript and we understand the intrinsics of the language, we set off to build a full stack application. We build a task management application where you can create a new task and set the priority as well as the status of the task. We also build real-time task counters and work on a complete server state synchronization.
While building the front end of this application, you learn how to use TypeScript with React, ShadcnUI and Tanstack Query. And, when we build the REST API with Node as a backend service for the application, we get practical hands-on experience on how to use Typescript in conjunction with NodeJS along with Express, Mongoose, and MongoDB database. If you are a full-stack developer, you can enjoy and build the complete project with me. And of you, skillsets are limited to the backend or front-end. You can choose the module based on your skills as these modules are self-contained and do not have a dependency on each other.
Detailed Breakdown Of Topics Covered In The Course:
What is TypeScript
How TypeScript helps You Write Better Code
Introduction To Types
Different types of types in TypeScript
Primitive types
Object types
Array types
Tuples
Enums
Unions
Intersection types
Custom types
Type inference
Void
Never
Functions in TypeScript
Call signatures
Function overloading
Polymorphic functions
Generics
Classes in TypeScript
Inheritance
Accessors and Mutators
Constructors
Access modifiers
Static members
Abstract classes
Method Overriding
Interfaces
Multiple inheritance with interfaces
TypeScript Compiler and how to modify it for your needs
JavaScript Prototypes and Objects
Prototypical inheritance
Property descriptors
Decorators
Decorator factories
Class decorators
Method decorators
Parameter decorators
Decorators on static members of a class
Property decorators
Multiple decorators and execution sequence
Subtypes and Supertypes
Typecasting
Type widening
Totality
Discriminated unions
Index Accessed types
KeyOff operator
Mapped types
Conditional Types
Type definitions for third-party libraries
Building a full stack application
Application front-end using - TypeScript with React, ShadcnUI, React Query / Tanstack Query.
Application backend REST API using- TypeScript with NodeJS, Mongoose, and MongoDB
Why You Should Learn TypeScript
TypeScript is a strongly typed programming language that builds on JavaScript. TypeScript is a superset of JavaScript and can be used along with JavaScript, allowing slow and steady upgradation. TypeScript has been voted the second most loved programming language in the Stack Overflow 2020 Developer survey.
Since the introduction of NodeJS to the community a decade ago, JavaScript has become the most widely used cross-platform programming language. While the size, scope, and complexity of JavaScript programs have grown exponentially, the JavaScript language's ability to express the relationships between different entities of code has not. The most common errors that programmers make are type errors: a specific type of value was used when a different type of value was expected. This could result from simple typos, a failure to understand a library's API surface, incorrect assumptions about runtime behavior, or other errors. TypeScript's goal is to be a static type checker for JavaScript programs.
Apart from providing type checking and strict types, TypeScript comes with a bunch of features that help you to write Object Oriented Code. These features are specific to TypeScript and do not exist in JavaScript.
Who Should Take This Course?
If you are an existing JavaScript developer and want to up your JavaScript game with TypeScript. This course is a perfect fit for you.
If you already have some basic TypeScript knowledge and want to dive deep into advanced concepts. This course is a perfect fit for you.
If you want to learn how to use TypeScript and existing technologies such as React, ShadcnUI, Tanstack Query, Node.js, Mongoose and MongoDB. This course will help you learn TypeScript in conjunction with these technologies.
Who Should Not Take This Course?
Since TypeScript is a superset of JavaScript, this course is not for you if you have never worked on JavaScript. You do not need to be an expert at JavaScript but should have some basic knowledge of JavaScript to benefit from this course.
Suppose you are a new programmer looking for your first programming language course. Then this course is not for you. Since TypeScript builds up on JavaScript, some prior knowledge of JavaScript programming is needed to be able to take this course.