In this particular case, the library is changing what this refers to inside the callback for decorate. When using arrow functions (=>), this is equivalent to the this of the outer scope. This means that you're basically stuck using function for this.