Parameter injection with JavaScript decoratorsby@jlowery2663
2,625 reads

Parameter injection with JavaScript decorators

tldt arrow
Read on Terminal Reader

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"

Company Mentioned

Mention Thumbnail
featured image - Parameter injection with JavaScript decorators
jefflowery HackerNoon profile picture

@jlowery2663

jefflowery

Learn More
LEARN MORE ABOUT @JLOWERY2663'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa