
Explore TypeScript from beginner to advanced in this complete bootcamp. Build real-world full-stack projects using Node and Angular, learn static types, type inference, and compiler options for robust development.
Set up your development environment for TypeScript by installing Node.js, choosing an IDE (WebStorm or Visual Studio Code), and optionally Git, then start compiling TypeScript and building practical projects.
Discover why TypeScript, a strongly typed superset of JavaScript, catches errors at compile time and enables powerful tooling, auto completion, and safe refactoring for scalable code.
Install the TypeScript compiler globally, transpile your first program with tsc to plain JavaScript, and observe how type annotations are erased at runtime as Node executes the result.
Discover how the tsc compiler's noEmitOnError flag prevents output when a TypeScript error occurs, ensuring you won't generate or run faulty JavaScript.
Learn to run a TypeScript program in a browser by compiling with the TypeScript compiler, starting a light server, and using hot reload to update the browser automatically.
Compare const, let, and var in TypeScript: const for read-only references, let for mutable values with block scope, and var for non-scoped JavaScript. Prefer const, then let, avoid var.
Explore TypeScript primitive types such as numbers, strings, and booleans through practical examples, highlighting number operations, string immutability, boolean checks, and the upcoming template strings feature.
Explore how TypeScript handles strings using quotes, single quotes, and backticks, and learn why template strings enable embedding variables with ${} for readable, maintainable concatenation.
Explore type inference in TypeScript, learn how the compiler deduces string types from values, and understand when to add type annotations.
Learn when to use TypeScript type annotations and why, avoid redundant annotations when possible, rely on type inference, and annotate function input arguments to enforce correct parameter order.
Explore how TypeScript enforces a static type system, preventing runtime type changes allowed in JavaScript; compare compile-time types with runtime behavior, using typeof to observe before and after values.
explore the object type in typescript by defining a course object with title, subtitle, and lessons count, and see how the compiler infers types and enforces property names.
Explore nested object types in TypeScript by defining objects within objects, including a nested offer with first and last name. See how type inference handles these structures.
Explore the difference between null and undefined in TypeScript and JavaScript, and learn to use null for optional variables to signal absence of value.
Discover optional chaining in TypeScript, a safe way to access nested properties using the question mark dot operator, preventing null errors and yielding undefined when absent.
Explore the TypeScript null coalescing operator and its relation to optional chaining, showing how to provide default values when fields are undefined, and discuss best practices for using optional chaining.
Learn best practices for using the optional chaining operator in TypeScript, avoiding overreliance. See how proper error handling can make or break access to properties like the title field.
Explore how TypeScript treats arrays as type-safe JavaScript arrays, using type inference to detect element types, exposing a length property and familiar methods like map and filter.
Define a TypeScript enum called course type to represent free, premium, private, and hidden courses, replacing numeric values with a more readable enum.
Understand why the any type undermines type safety in TypeScript and how to avoid it with explicit types; learn common scenarios where any is implicitly assigned.
Learn how implicit any arises from type inference and how the noImplicitAny flag enforces explicit types to improve type safety and error detection.
Explore TypeScript union types, using strings or numbers as identifiers, and learn to model optional or nullable variables with null and array types.
Discover the TypeScript non-null assertion operator, using the bang to assure the compiler a value where strict null checks would error, and compare it to optional chaining and runtime risks.
Explore how TypeScript strict null checks enforce non-nullable variables by requiring explicit union types like number | null and enabling the strictNullChecks compiler flag, with practical examples.
Explore how TypeScript literal types constrain values by inferring single-value types for constants and using unions for valid page sizes (10, 15, 20) and course statuses (draft, published, unpublished, archived).
Learn how type aliases define custom types like course status and a course object, enabling reuse and type safety; discover why interfaces are recommended and will be covered next.
define a custom object type in TypeScript using interfaces, reuse the type across variables, and control property requirements with optional and read-only modifiers.
compare interfaces and type aliases to define custom object types. use interfaces for custom object types, and reserve type aliases for simple or union types, since interfaces can be extended.
Explore TypeScript type assertions, learning how to cast and narrow types with as syntax, practical use with getElementById, and the limits of assertion with any.
Explore how TypeScript modules isolate code by default and use export and import to share constants, objects, and types across files, enabling reuse of page size and other values.
Learn how to use TypeScript module re-exports to create a simple import barrel, renaming exports, and exposing a package's APIs through an index file.
Explore how to manage multiple exports in a TypeScript module, using default exports and the import * as syntax to group imports, and understand when to apply a default export.
Master how TypeScript arrow functions simplify callbacks and clarify this binding compared to regular functions. Learn when to use arrow syntax for concise, readable code.
Understand how TypeScript default function parameters work by assigning default values and calling functions with arguments. Discover type inference from defaults and the versatility of optional parameters in any position.
Explore how the TypeScript object spread operator creates shallow copies and how nested objects like stats behave, then compare shallow versus deep copies and use clone-deep for deep copies.
Master TypeScript object destructuring to extract title, subtitle, and lessons count from a course object, improving readability and reducing boilerplate, with rest and spread patterns showcased.
Use the array spread operator to copy and extend arrays and understand its shallow copy behavior for primitives versus objects; then apply array destructuring to bind elements to local variables.
Explore TypeScript rest parameters and rest arguments, turning the last parameter into a flexible list of courses. See how rest syntax improves readability and usability.
Learn how to debug TypeScript in the browser and Node, using breakpoints, source maps, and the TypeScript compiler to map to JavaScript output.
Debug TypeScript in a Node environment by generating source maps, running Node with the inspect flag, and attaching a debugger to set breakpoints and inspect runtime variables.
Master TypeScript's shorthand object creation notation to build objects concisely using variables as properties, reduce duplication, and apply refactoring to title and subtitle.
Explore how the TypeScript type system handles functions and how the JavaScript runtime executes them, with emphasis on type-safe, annotated parameters and returns.
Discover how the JavaScript runtime treats functions as values in TypeScript, making them first-class citizens that can be assigned to constants and passed as callbacks.
Explore TypeScript custom function types and type aliases to create type-safe callbacks, such as on course created, and enforce function signatures that align with the course interface.
Discover how typescript tuples model database-like records and arrays, define strict tuple types, decide when to use tuples versus object types, and return multiple values from functions.
Explore the unknown type and its relationship to any in TypeScript. Demonstrate how unknown requires type checks before assignment, unlike any, and advise cautious use to preserve type safety.
Master TypeScript type narrowing and custom type predicate functions to safely convert unknown values to a course type using type guards, improving compiler confidence and code safety.
Explain the never type in TypeScript, which cannot accept any value, and show how core status (draft or published) uses an expected error to cover all cases, and type inference.
Explore TypeScript intersection types, the counterpart to union types, and learn to create a type that combines properties from multiple interfaces, like has id and has title, for a course.
Explore the TypeScript compiler options through tsconfig.json, focusing on the target property (ES5 vs next) and how features like optional chaining and null coalescence are emitted.
Discover how to use a custom tsconfig file by renaming it and applying it with the --project flag, choosing targets like es5 or esnext.
Configure the TypeScript compiler to compile only selected files using the files property, specify entry points, and follow the full dependency tree to compile imported modules, avoiding duplicate identifiers.
Control which TypeScript files compile by using include and exclude in the config file, with glob patterns like **, *, and ?, to target files under the source folder.
Explains how the tsconfig.json outDir and rootDir properties control where compiled files are written. Shows using the include property to limit to the source folder and redirect output to dist.
Explore the tsconfig.json module property and why commonjs is the recommended module type for most TypeScript projects, including how imports and exports compile to node-friendly code.
Discover how to use the tsconfig.json lib and nolib properties to control which libraries the TypeScript compiler includes, such as adding the dom API for browser code.
Configure the TypeScript baseUrl in the tsconfig to point imports to the source folder, replacing relative paths and simplifying module resolution. Verify compilation succeeds and the IDE stops flagging errors.
Configure the TypeScript compiler to include third‑party types via typeRoots and the types array, install @types/express, and use skipLibCheck to keep builds stable.
Explore how to include plain JavaScript files in a TypeScript project using allowJs and checkJs, enabling imports and conditional type checking.
Learn to configure the TypeScript compiler with miscellaneous options such as source maps, no emit on error, no emit, and remove comments in config.json, plus strict null checks.
Explore TypeScript's object oriented programming section using class syntax to model data and behavior, with examples like date API and promises, and learn to create classes with inheritance and polymorphism.
Create and use a TypeScript class as blueprint with data and behavior, define a constructor to initialize member variables, and add a method to compute age in days since creation.
Learn how to declare and initialize class member variables in TypeScript. Explore type inference, default public visibility, private encapsulation, and constructor shorthand for member declarations.
Learn to declare class member variables as readonly, making them immutable inside and outside the class, and trigger compile errors on reassignment.
Learn TypeScript getters and setters to control property access, implement computed properties, validate inputs, and safely expose internal state with public getters and a private backing field.
Explore why TypeScript does not support multiple constructors and learn to use default parameters to initialize creation date and subtitle with type inference guiding parameter types.
Explore how the this keyword accesses the current object context inside a class, across constructors, getters, setters, and methods, and how arrow functions preserve this context for asynchronous code.
Explore how the static keyword creates properties shared by class instances, including a mutable total courses and a read only constant like TypeScript title, accessible via the class name.
Learn how static class methods work in TypeScript, including accessing via the class name, avoiding instance context, and using them as utilities when they operate on input arguments.
Master object oriented inheritance by deriving a child class from the course class to reuse functionality, add a price property, and ensure price is greater than zero via a validate method.
Discover how to create a child class in TypeScript with the extends keyword, override validate, and call super in the constructor to set a zero price for a free course.
Explore how the protected keyword in TypeScript balances private and public access, enabling safe access for parent and child classes, and influencing constructor visibility.
Explore how abstract classes in TypeScript define templates that cannot be instantiated, enforcing contracts via abstract methods in subclasses.
Define and implement object oriented interfaces in TypeScript to enforce contracts with ID and title properties, implement methods like print ID, extend interfaces, and combine multiple interfaces in classes.
Explore the singleton pattern in TypeScript by implementing a single course service instance with a private constructor and a static instance method, ensuring initialization happens once.
Learn how generics enable reusable, type-safe code in TypeScript by using generic syntax with arrays (angle brackets), preventing type errors, and exploring generic classes and functions, including the promise library.
Learn how generics shape promises in TypeScript, including the Promise constructor, generic parameters, and string results, with a guide to config JSON for lib, dom, and read-only and partial types.
Learn how the partial interface, derived from the course type via generics, enables safe partial updates to a course via a single update signature, with full type safety.
Discover how to create immutable objects in TypeScript using a read-only generic interface and the Object.freeze approach for compile-time safety.
Learn to create a first generic function in TypeScript, using a generic type parameter T to return a read only version of input, and rely on type inference for safety.
Create a type-safe merge function that takes two objects with multiple generic parameters and returns a merged object using generic types T and U and an intersection type.
Explore TypeScript generics with type constraints using the extends keyword to enforce object types, boosting type safety and preventing primitives when freezing objects.
Learn how the key of operator enables safe generic programming in TypeScript by building a type for object keys and a type-safe extract property function with type inference.
Transform a non-generic key-value class into a generic TypeScript class using type parameters K and V to achieve stronger type safety and automatic type inference.
Learn how TypeScript decorators enable meta programming to compose features from multiple libraries in a class, method, or property, often without inheritance.
Implement a TypeScript method decorator for logging using a log decorator and a decorator factory. Configure logging levels and an application maximum logging level to control console output.
Explore how a TypeScript log decorator wraps a method with a decorator factory, adding logging before and after calls. Examine the target, property key, and descriptor that enable prototype access.
Learn to implement a log decorator in TypeScript, wrapping the original function with a new one, using a decorator factory and console logging while preserving this context.
Apply multiple decorators to the same method to combine log and perf decorators, and observe how decorator order changes behavior as start and finish timestamps reveal execution.
Apply the seal class decorator to seal a class's constructor function and prototype with Object.seal, preventing runtime modification and ensuring the class cannot be altered.
Learn how to implement a TypeScript property decorator that auto generates a database id for a class field, using a decorator factory, a getter, and object.defineProperty to preserve instance context.
This course covers in-depth the Typescript language and includes several practical projects. It comes with a running Github repo.
This Course in a Nutshell
One of the biggest novelties in the Javascript frontend development space in the last few years is that the use of Typescript has become almost universal.
To the point that it almost does not make sense anymore to start a new project and not use Typescript, given its huge advantages, and almost no downsides.
And this includes projects not only in Node, but also in React, Angular, and any other Javascript-based frontend framework.
Typescript is a strongly typed language that is a superset of Javascript, meaning that Javascript programs are valid Typescript programs (depending on the settings we use for the compiler), but not the other way around.
So in a nutshell, this means that you can see Typescript as a better and improved version of Javascript.
But even though superficially similar, Typescript due to its powerful type system is actually a completely different language than Javascript.
The static type system of Typescript provides many advantages as it allows us to catch many program errors at development instead of at runtime, and it enables powerful development tooling such as precise auto-completion and different types of refactoring.
But to benefit from the power of the type system, we actually don't have to add type annotations everywhere and end up with code that looks like Java or C#, and sacrifice flexibility, development speed and readability.
The type system can automatically infer the types of most variables automatically, without us having to declare them explicitly, meaning that we can essentially write type-safe Javascript-like code with minimal type annotations.
This powerful type inference is really the killer language feature that makes Typescript the preferred way of starting both a frontend and a backend project today: we get all the benefits of a static type system essentially for free, with no downsides.
Course Overview
This course is divided into multiple sections, that you can take directly depending on your previous level of familiarity with the language. So there are multiple learning paths available for you, depending on your previous experience.
The course will start with a deep dive into all the language features starting with the most basic ones but covering also in detail the most advanced features.
So if you are already familiar with some of the features you can skip ahead, and focus only on the features that you aren't aware of yet.
We will present the language features from the most elementary ones to the most advanced, and we will cover first the features that are most commonly used.
For completeness, we will also cover a lot of features that are rarely used, but we will point that out explicitly, especially if it's a feature that you are very unlikely to ever use while coding at the application level.
Besides the language features, we are going to dedicate a full section to the configuration of the Typescript compiler, and go over every option you have available.
We will make it clear when a compiler feature is rarely needed when compared with features that you will be using all the time.
We will still cover everything for completeness, but we want to give you the option to focus only on the most commonly used compiler options if that is what you prefer.
After this initial section covering all language features, we are going to cover also in detail Object-oriented programming, Generics and Decorators, each in their own section.
These 3 sections are mostly independent of the rest of the course and can be taken separately.
After the language sections, we enter the part of the course that covers practical projects.
These practical projects are as close to what you would develop in the real world as possible. This means that these are still small projects that you can comfortably build without spending too much time, but they contain all the building blocks and illustrate all the same design elements that you would have to put in place in a real application.
For example, we are going to build a complete example of a REST API in Node using Typescript and TypeORM, a Typescript-friendly ORM for Node. The server will be designed will all the typical elements of a production system in mind.
For example, the API will be fully secure, and it will require the user to be properly authenticated with a JWT. The API will support multiple levels of access, from a read-only user to an admin user that can edit the data.
Next, once the backend is completed, we are going to build also a couple of frontends with Typescript, namely an Angular frontend, each one in its own separate project.
This way, you will have built your complete system (both frontend and backend) using only one single common language: Typescript.
Table of Contents
This course will go over the following topics:
Introduction to Typescript
The Typescript Type System
The most powerful feature of Typescript: type inference
In-depth coverage of all the Typescript language features, from the most simple to the most advanced
In-depth coverage of all the features available in the Typescript compiler
Object-oriented programming
Typescript Generics in depth
Typescript Decorators in depth
Practical Typescript Project - Secure Node REST API with TypeORM
What Will You Learn In this Course?
In this course, you will learn everything that you need to know to build both the backend and the frontend of your application using the same language: Typescript.
You will know all the features of the language in-depth, and you will be aware of the distinction between the features that you will be using almost every day, from the features that you will only sparingly use.
You will also know in detail the multiple features that you have available in the Typescript compiler.
You will know how to build real-world projects with Typescript, including how to develop your backend with Node and Typescript, and also how to build your frontend in Typescript using modern frameworks.
Have a look at the course free lessons below, and please enjoy the course!