Question · JavaScript and TypeScript course · Module 7: Advanced TypeScript

Method decorator

What is a decorator in TypeScript?

Answer options

  • A special function that modifies classes, methods, or properties using the @decorator syntax
  • An HTML template for decorating the user interface
  • A tool for formatting TypeScript code
  • A mechanism for importing external libraries

You can check the correct answer by solving this task in the CodeWorlds game.