November 2019
Beginner
804 pages
20h 1m
English
Decorators provide a way to do metaprogramming and attach metadata to classes and class members (that is, methods, accessors, fields, and parameters). They're sometimes referred to as annotations, but they are more than that (in TypeScript at least).
Annotations provide a way to attach metadata to annotated elements. While decorators can do the same, they can also expand and/or modify the behavior of the elements they're applied to.
In TypeScript, decorators are declared using functions with specific arguments and can be attached to classes and class members ...
Read now
Unlock full access