Adding Runtime Property in Object doesn't show in "this" context

38 Views Asked by At

Just wondering , why when this is printed on console , doesn't show the dynamic property, which is added using Object.defineProperty

Here is a Decorator example. It's working as expected but the success, error property is not shown in this. I guess this is javascript behaviour and has nothing to do with decorators.

May I get a glimpse of this behaviour?

1

There are 1 best solutions below

0
f0nar On

Try to assign true to 'enumerable' property of property descriptor object.