5. Parameter Decorator

# Typescript Decorator
Medium
Each method in a class can also have its own decorators.
Similar to property decorators, parameter decorators are generally not used alone, but are used in combination with class or method decorators.

Parameters

  1. target is the constructor of the class for static members, and the prototype object of the class for instance members.
  2. key method name
  3. index position in the parameter array
For example, if we need to format the parameters of a method, we can create a decorator specifically for formatting.