Too Long; Didn't Read
JavaScript decorators have been a language feature since ES2015 came out, but they are still largely ‘experimental’ in JavaScript engines that support them. With decorators, you’re not actually limited to the arguments that you are given, but can infer parameter values from within the decorator, passing those onto the wrapped method. All code in this article can be found here. To run sample code, add the following run target in package.json: "scripts": "babel-node yourdecoratedcode.js --require babel-polyfill"
Share Your Thoughts