Put in order · JavaScript and TypeScript course · Module 7: Advanced TypeScript
Steps to Create a Method Decorator
Order the steps for creating a method decorator in TypeScript (experimentalDecorators mode):
Items to put in order
- Replace the method with a new implementation
- Call the original method inside the new one
- Capture the original method
- A decorator function definition
- Return the modified descriptor
You can check the correct answer by solving this task in the CodeWorlds game.