Brian Shen

10. Decorator Evaluation

# Typescript Decorator
Medium
Parameters decorators -> Methods decorators -> Accessor/Property decorators -> Class decorators
It is particularly important to note the difference between getMetadata and getOwnMetadata.
There is a well defined order to how decorators applied to various declarations inside of a class are applied:
  1. Parameter Decorators, followed by Method, Accessor, or Property Decorators are applied for each instance member.
  2. Parameter Decorators, followed by Method, Accessor, or Property Decorators are applied for each static member.
  3. Parameter Decorators are applied for the constructor.
  4. Class Decorators are applied for the class.