Method Decorators in ECMAScript 2015 (and beyond)

added by bpwndaddy
6/30/2015 3:47:58 PM

2 Kicks, 325 Views

Function decorators can be used as method decorators, provided that we take care to handle this properly, and manage state carefully when required. The patterns for creating and using method decorators in JavaScript are straightforward, in large part because underneath the syntactic sugar for classes, we are still working with functions, objects, and delegation through prototypes.