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

Method decorator

What three arguments does a method decorator receive in TypeScript in experimentalDecorators mode?

Answer options

  • target (prototype), propertyKey (name), descriptor (PropertyDescriptor)
  • constructor, methodName, returnType
  • this, arguments, metadata
  • class, method, parameters

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