
Learn TypeScript decorators through hands-on coding in a practical environment, balancing theory with real code concepts as you start this brand-new course.
Learn how experimental TypeScript decorators work by building a first sample decorated class, enabling class decorators, and observing runtime behavior and decorator metadata features.
Remove the experimental decorator warning by directing all compiled JavaScript to a dedicated build folder, configuring the output directory, and compiling the entire project with a single command.
Explore the four types of TypeScript decorators—class, property, method, and parameter—and see how each applies to classes, properties, methods, and parameters.
Apply a sample property decorator to a class property, learning how the decorator receives the target and property key. See how it attaches behavior during compilation.
Learn how a method decorator is applied to a teach method in a teacher class, with runtime decoration and interaction with a property decorator, including evaluation and running sequences.
Explore how a parameter decorator receives the target object, property key, and parameter index, compiled and executed at runtime, and how it integrates with class, property, method, and parameter decorators.
Explore how decorator factories unlock parameterized decorators in TypeScript by returning a decorator function that accepts arguments, enabling custom behavior for methods and other targets.
Explore decorator factories in depth for all TypeScript decorators. Learn to pass values and log them while observing runtime behavior for method, property, parameter, and class decorators.
Learn how property descriptors in JavaScript define data and accessor properties, controlling enumerable, configurable, and writable attributes, and see how to define and access properties in objects and loops.
Explore reflection and metadata and how the reflect metadata library enables using them with decorators in TypeScript and JavaScript. Understand how metadata describes objects, properties, methods, and constructors.
Install and configure reflect-metadata for TypeScript decorators, enable decorator metadata, then define an employee class with id and name, and a constructor to assign them.
Learn how to use TypeScript decorators and reflect metadata to retrieve a property's type, demonstrated by a logType decorator applied to employeeId with design:type returning string.
Immerse in implementing an email validation decorator in TypeScript using a property decorator, setter and property descriptor, backed by a regex check and console messages for invalid addresses.
Implement a max length validation decorator in TypeScript using a decorator factory for a property like employee name, enforcing a 20-character limit and logging validation messages.
Learn how to implement a numeric validation decorator in TypeScript using a decorator factory. Enforce age limits via a setter and property descriptor.
In this course you learn in depth the following topics
1. What are TypeScript decorators ?
2. Types of TypeScript Decorators
3. Decorator Factories
4. Implementing Decorator factories with different types of Decorators
5. Property Descriptors
6. Introduction to Reflection and Meta data
7. Variety of Use cases and
8. Practical coding examples for different types of validations and their implementations through TypeScript Decorators.
TypeScript is the superset of JavaScript. TypeScript Decorators are a feature in TypeScript through which you attach functionalities to various parts of objects and classes, functions, properties and parameters etc.
TypeScript Decorators play an important role in many JavaScript based frameworks and technologies including Angular, React, VueJS and other prominent libraries which support TypeScript. That is why it is a very important part of every programmer's toolset.
Learning this feature and adding it to your toolset will definitely add to your skill set in different directions including Web APIs, client side programming or server side programming.
Whether you are a beginner level programmer, an intermediate or an expert, this course has something for everyone. Explanations are kept so simple and easy to understand that it is easily understood by all, but without losing any core concepts.
The better approach will be to code in parallel and become hands on with these advanced concepts. That is why I have coded each line right there. And concepts and theories have been discussed in live coding so as not to bore with the static slides and graphics. Instead keeping engaged in coding all the time.