Skip to Content
Learning TypeScript 2.x - Second Edition
book

Learning TypeScript 2.x - Second Edition

by Remo H. Jansen
April 2018
Beginner content levelBeginner
536 pages
13h 21m
English
Packt Publishing
Content preview from Learning TypeScript 2.x - Second Edition

Summary

In this chapter, we learned how to consume and implement the four available types of decorators (class, method, property, and parameter). We used decorators to mutate the original classes to understand how they work but we also learned that we should avoid using decorators to mutate the prototype of a class. We also learned how to create a decorator factory to abstract developers from the decorator types when they are consumed, how to pass configuration to a decorator, and how to use the reflection metadata API to access type information at runtime. As we have already mentioned, decorators in TypeScript are still an experimental feature, which doesn't mean that they are not ready for their usage in production systems but that their ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering TypeScript - Fourth Edition

Mastering TypeScript - Fourth Edition

Nathan Rozentals
Learning TypeScript

Learning TypeScript

Josh Goldberg
TypeScript for Beginners

TypeScript for Beginners

Bharath Thippireddy

Publisher Resources

ISBN: 9781788391474Supplemental Content