Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- target : any
- propertyKey : string
- descriptor: PropertyDescriptor
- ```
- ## target
- means the instance of the class where we are applying this decorator.
- This object is very helpful in order to maintain the context of the method.
- You will use target to call the original method with respect to its context.
- In our below example target value would be instance of the calculator class.
- ## propertykey
- This is the name of the method where we are applying decorator. In our below example propertykeywill be add method name.
- ## descriptor
- This is a complex object it contains metadata about the method where decorator is applied.
Add Comment
Please, Sign In to add comment