This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
This blog post covers the ECMAScript proposal “Decorators by Daniel Ehrenberg and Chris Garrett in its 2022-03 version (stage 3).
A decorator is a function func
that we can apply to classes and members of classes (such as methods) by putting @func
before them. We will explore how decorators work and look at many examples.
This content originally appeared on 2ality – JavaScript and more and was authored by Dr. Axel Rauschmayer
Dr. Axel Rauschmayer | Sciencx (2022-10-18T00:00:00+00:00) JavaScript metaprogramming with the 2022-03 decorators API. Retrieved from https://www.scien.cx/2022/10/18/javascript-metaprogramming-with-the-2022-03-decorators-api/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.