This chapter covers
- What the TypeScript decorators are for
- How to create a new type based on an existing one using mapped types
- How conditional types work
- Combining mapped and conditional types
In previous chapters, we covered the main types, which should be sufficient for most of your coding activities. But TypeScript goes further and offers you additional derivative types that can be quite handy in certain scenarios.
We used the word “advanced” in this chapter’s title for a couple of reasons. First, you don’t have to know these types to be a productive member of your team. Second, their syntax may not be immediately obvious to a software developer who’s familiar with other programming languages.
The title of this book is TypeScript Quickly, and the content in the first four chapters deliver on the promise to introduce the main syntax constructs of the language at a fast pace. But you may need to read this chapter more then once.